mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-01 20:52:48 +08:00
完善Model的自动关联更新
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user