From e484f1f689c12b91b795f6d5cc60144f4e47a597 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Sun, 3 Jul 2016 20:41:34 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9B=E9=A2=84=E8=BD=BD=E5=85=A5?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E7=9A=84=E5=85=B3=E8=81=94=E5=AF=B9=E8=B1=A1?= =?UTF-8?q?=E7=9A=84isUpdate?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/model/Relation.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)); } /**