From 1318c9e5b30a0ff219b675337d96d7d699f8fb09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=91=E6=9E=97?= Date: Thu, 17 Aug 2023 17:33:55 +0800 Subject: [PATCH] qqq --- Base/Model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Base/Model.php b/Base/Model.php index fef14f9..d2eb97b 100644 --- a/Base/Model.php +++ b/Base/Model.php @@ -514,7 +514,7 @@ abstract class Model extends Component implements ModelInterface, ArrayAccess, T { $changes = \array_diff_assoc($this->_attributes, $this->_oldAttributes); if ($this->hasPrimary()) { - $condition = [$this->getPrimary() => $this->_oldAttributes[$this->getPrimary()]]; + $condition = [$this->primary => $this->_oldAttributes[$this->primary]]; } else { $condition = \array_intersect_assoc($this->_oldAttributes, $this->_attributes); }