From 158a04cf44136411994650daccf61c58173788b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Wed, 24 Feb 2021 19:05:58 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Database/ActiveRecord.php | 1 + 1 file changed, 1 insertion(+) diff --git a/Database/ActiveRecord.php b/Database/ActiveRecord.php index ac3f3f68..e0de3197 100644 --- a/Database/ActiveRecord.php +++ b/Database/ActiveRecord.php @@ -152,6 +152,7 @@ class ActiveRecord extends BaseActiveRecord if (empty($condition)) { $condition = [$this->getPrimary() => $this->getPrimaryValue()]; } + $condition = static::find()->where($condition)->getCondition(); $execute = static::getDb()->createCommand() ->mathematics(self::getTable(), [$action => $columns], $condition); if ($execute instanceof Command) {