From fecb446621fe3c65cba24a0ef6db701ad2cd8974 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Mon, 11 Apr 2016 10:33:17 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9BModel=E7=B1=BBdata=E6=96=B9?= =?UTF-8?q?=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/Model.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/library/think/Model.php b/library/think/Model.php index 221f6e90..9fbee3b4 100644 --- a/library/think/Model.php +++ b/library/think/Model.php @@ -153,6 +153,10 @@ abstract class Model implements \JsonSerializable, \ArrayAccess throw new Exception('data type invalid', 10300); } $this->data = $data; + // 标记字段为更改 + foreach ($data as $key => $val) { + $this->change[] = $key; + } return $this; }