1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
|
# This patch file was generated by NetBeans IDE
# It uses platform neutral UTF-8 encoding and \n newlines.
--- <html>ORMPurger.php (<b>5 août 2012 14:42:12</b>)</html>
+++ <html><b>Current File</b></html>
@@ -127,6 +127,7 @@
$orderedTables[] = $class->getQuotedTableName($platform);
}
+ $this->em->getConnection()->executeUpdate("SET foreign_key_checks = 0;");
foreach($orderedTables as $tbl) {
if ($this->purgeMode === self::PURGE_MODE_DELETE) {
$this->em->getConnection()->executeUpdate("DELETE FROM " . $tbl);
@@ -134,6 +135,7 @@
$this->em->getConnection()->executeUpdate($platform->getTruncateTableSQL($tbl, true));
}
}
+ $this->em->getConnection()->executeUpdate("SET foreign_key_checks = 1;");
}
private function getCommitOrder(EntityManager $em, array $classes) |
Partager