This commit is contained in:
2020-12-17 14:17:03 +08:00
parent 33e5416dda
commit 0456a155c8
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -234,9 +234,9 @@ class ActiveRecord extends BaseActiveRecord
$primary = $this->getPrimary();
if (!empty($primary)) {
$sul = static::deleteAll([$primary => $this->getAttribute($primary)]);
$sul = static::deleteByCondition([$primary => $this->getAttribute($primary)]);
} else {
$sul = static::deleteAll($conditions);
$sul = static::deleteByCondition($conditions);
}
if (!$sul) {
return false;