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