From e3665caeebd80d8cb12aed4b264fad35acd6f886 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Sat, 13 May 2017 12:15:05 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E5=85=B3=E8=81=94=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E5=86=99=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/Model.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/library/think/Model.php b/library/think/Model.php index 88897f48..5e8a8a36 100644 --- a/library/think/Model.php +++ b/library/think/Model.php @@ -927,6 +927,9 @@ abstract class Model implements \JsonSerializable, \ArrayAccess } } elseif (isset($this->relation[$name])) { $relation[$name] = $this->relation[$name]; + } elseif (isset($this->data[$name])) { + $relation[$name] = $this->data[$name]; + unset($this->data[$name]); } } }