fixed problem with not closed transaction in deleteAll()

This commit is contained in:
Carsten Brandt
2013-09-25 16:58:23 +02:00
parent b42f4b4ea0
commit b95c056b02

View File

@@ -155,6 +155,7 @@ class ActiveRecord extends \yii\db\ActiveRecord
$attributeKeys[] = static::tableName() . ':a:' . $pk; $attributeKeys[] = static::tableName() . ':a:' . $pk;
} }
if (empty($attributeKeys)) { if (empty($attributeKeys)) {
$db->executeCommand('EXEC');
return 0; return 0;
} }
$db->executeCommand('DEL', $attributeKeys); $db->executeCommand('DEL', $attributeKeys);