Skip to content

Commit

Permalink
改进修改器对json字段的支持
Browse files Browse the repository at this point in the history
  • Loading branch information
liu21st committed Aug 28, 2024
1 parent 7f5f5eb commit 122a32a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/model/concern/Attribute.php
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ public function setAttr(string $name, $value, array $data = []): void
if (is_null($value) && $array !== $this->data) {
return;
}
} elseif (isset($this->type[$name])) {
} elseif (!in_array($name, $this->json) && isset($this->type[$name])) {
// 类型转换
$value = $this->writeTransform($value, $this->type[$name]);
} elseif ($this->isRelationAttr($name)) {
Expand Down

0 comments on commit 122a32a

Please sign in to comment.