mirror of
https://github.com/doctrine/data-fixtures.git
synced 2026-03-23 22:32:13 +01:00
@@ -132,11 +132,13 @@ class ORMPurger implements PurgerInterface
|
||||
$orderedTables[] = $this->getTableName($class, $platform);
|
||||
}
|
||||
|
||||
$connection = $this->em->getConnection();
|
||||
foreach($orderedTables as $tbl) {
|
||||
if ($this->purgeMode === self::PURGE_MODE_DELETE) {
|
||||
$this->em->getConnection()->executeUpdate("DELETE FROM " . $tbl);
|
||||
$tbl = $connection->quoteIdentifier($tbl);
|
||||
$connection->executeUpdate('DELETE FROM ' . $tbl );
|
||||
} else {
|
||||
$this->em->getConnection()->executeUpdate($platform->getTruncateTableSQL($tbl, true));
|
||||
$connection->executeUpdate($platform->getTruncateTableSQL($tbl, true));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user