From 62cd93f1fe53aaaf86a093c9c809f18e382ea114 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Thu, 29 Sep 2016 21:11:35 +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=8B=20=E4=B8=BB=E8=A1=A8=E7=9A=84=E4=B8=BB=E9=94=AE?= =?UTF-8?q?=E5=90=8D=E5=92=8C=E9=99=84=E8=A1=A8=E7=9A=84=E5=85=B3=E8=81=94?= =?UTF-8?q?=E9=94=AE=E5=90=8D=E4=B8=80=E8=87=B4=E5=AF=BC=E8=87=B4=E5=85=B3?= =?UTF-8?q?=E8=81=94=E6=95=B0=E6=8D=AE=E5=86=99=E5=85=A5=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/model/Merge.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/think/model/Merge.php b/library/think/model/Merge.php index e03fd90c..a6c6f2f5 100644 --- a/library/think/model/Merge.php +++ b/library/think/model/Merge.php @@ -245,7 +245,7 @@ class Merge extends Model // 写入附表数据 $source = $this->data; - if ($insertId && is_string($pk) && isset($source[$pk])) { + if ($insertId && is_string($pk) && isset($source[$pk]) && $this->fk != $pk) { unset($source[$pk]); } foreach (static::$relationModel as $key => $model) {