From 7f2880603cd8cd39ef1a06b22655d558423e6075 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Fri, 30 Sep 2016 15:10:10 +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=E4=B8=BB=E9=94=AE=E5=92=8C=E5=85=B3=E8=81=94=E9=94=AE?= =?UTF-8?q?=E7=9B=B8=E5=90=8C=E7=9A=84=E6=83=85=E5=86=B5?= 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 f30679d9..c0a6f21c 100644 --- a/library/think/model/Merge.php +++ b/library/think/model/Merge.php @@ -126,7 +126,7 @@ class Merge extends Model $item = []; foreach ($data as $key => $val) { if ($insert || in_array($key, $this->change) || $this->isPk($key)) { - if (array_key_exists($key, $this->mapFields)) { + if ($this->fk != $key && array_key_exists($key, $this->mapFields)) { list($name, $key) = explode('.', $this->mapFields[$key]); if ($model == $name) { $item[$key] = $val;