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)) {