This commit is contained in:
2023-08-14 18:56:45 +08:00
parent 0a567634d6
commit 4a51a8a336
5 changed files with 22 additions and 3 deletions
+3 -1
View File
@@ -339,7 +339,9 @@ class ActiveQuery extends Component implements ISqlBuilder
{
$sql = $this->builder->delete();
if ($getSql === FALSE) {
return (bool)$this->execute($sql, $this->attributes)->delete();
$result = (bool)$this->execute($sql, $this->attributes)->delete();
$this->modelClass->optimize();
return $result;
}
return $sql;
}