diff --git a/library/think/model/Relation.php b/library/think/model/Relation.php index 3c95eb4b..d762afd5 100644 --- a/library/think/model/Relation.php +++ b/library/think/model/Relation.php @@ -317,7 +317,7 @@ class Relation // 设置关联模型属性 $list[$relation] = []; } - $result->setAttr($relation, new $model($list[$relation])); + $result->setAttr($relation, (new $model($list[$relation]))->isUpdate(true)); } /**