From 76292522e46b7114507e3ab361ba4891be31369f Mon Sep 17 00:00:00 2001 From: Administrator Date: Sun, 12 Dec 2021 04:29:09 +0800 Subject: [PATCH] 1 --- src/Base/Model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Base/Model.php b/src/Base/Model.php index e10ff76..92e70fc 100644 --- a/src/Base/Model.php +++ b/src/Base/Model.php @@ -614,7 +614,7 @@ abstract class Model extends Component implements ModelInterface, ArrayAccess, T return false; } [$change, $condition, $fields] = $this->separation(); - if (!$this->isNewExample) { + if (!empty($this->_oldAttributes) || !empty($this->getPrimaryValue())) { return $this->updateInternal($fields, $condition, $change); } return $this->insert($change, $fields);