From f029a433f06762c22dea9f3db7cedb418a47a039 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Wed, 21 Sep 2016 14:05:11 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9B=E8=81=9A=E5=90=88=E6=A8=A1?= =?UTF-8?q?=E5=9E=8Bsave=E6=96=B9=E6=B3=95=E8=BF=94=E5=9B=9E=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/model/Merge.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/library/think/model/Merge.php b/library/think/model/Merge.php index 566cf077..e03fd90c 100644 --- a/library/think/model/Merge.php +++ b/library/think/model/Merge.php @@ -209,7 +209,9 @@ class Merge extends Model // 处理关联模型数据 $data = $this->parseData($name, $this->data); $query = clone $db; - $query->table($table)->strict(false)->where($this->fk, $this->data[$this->getPk()])->update($data); + if ($query->table($table)->strict(false)->where($this->fk, $this->data[$this->getPk()])->update($data)) { + $result = 1; + } } // 新增回调 $this->trigger('after_update', $this);