From 97075e4d98f60268f821f84ea47748977a0863a7 Mon Sep 17 00:00:00 2001 From: lengai Date: Thu, 5 Oct 2017 13:01:57 +0800 Subject: [PATCH] =?UTF-8?q?fix-bug=20=E4=BF=AE=E5=A4=8D=E5=BD=93data?= =?UTF-8?q?=E5=8F=98=E9=87=8F=E4=B8=BA=E7=A9=BA=20=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E4=B8=8D=E9=AA=8C=E8=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/Model.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/library/think/Model.php b/library/think/Model.php index 386660c4..42743c5e 100644 --- a/library/think/Model.php +++ b/library/think/Model.php @@ -1028,7 +1028,6 @@ abstract class Model implements \JsonSerializable, \ArrayAccess $data = []; } - if (!empty($data)) { // 数据自动验证 if (!$this->validateData($data)) { return false; @@ -1041,7 +1040,7 @@ abstract class Model implements \JsonSerializable, \ArrayAccess $this->isUpdate = true; $this->updateWhere = $where; } - } + // 自动关联写入 if (!empty($this->relationWrite)) {