mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-21 17:20:57 +08:00
fixed problem with not closed transaction in deleteAll()
This commit is contained in:
@@ -155,6 +155,7 @@ class ActiveRecord extends \yii\db\ActiveRecord
|
||||
$attributeKeys[] = static::tableName() . ':a:' . $pk;
|
||||
}
|
||||
if (empty($attributeKeys)) {
|
||||
$db->executeCommand('EXEC');
|
||||
return 0;
|
||||
}
|
||||
$db->executeCommand('DEL', $attributeKeys);
|
||||
|
||||
Reference in New Issue
Block a user