diff --git a/library/think/Model.php b/library/think/Model.php index 21fc10f0..3455b4a8 100644 --- a/library/think/Model.php +++ b/library/think/Model.php @@ -831,6 +831,7 @@ abstract class Model implements \JsonSerializable, \ArrayAccess if ($val instanceof Model) { $val->save(); } else { + unset($this->data[$name]); $model = $this->getAttr($name); if ($model instanceof Model) { $model->save($val);