1
0
mirror of synced 2025-01-31 12:32:59 +03:00

stop executing executeDeletions when there is nothing to to delete anymore

This commit is contained in:
Zacharias Luiten 2014-02-25 14:00:33 +01:00
parent f5897d4b0b
commit 8a168bb2ce

View File

@ -373,7 +373,7 @@ class UnitOfWork implements PropertyChangedListener
// Entity deletions come last and need to be in reverse commit order
if ($this->entityDeletions) {
for ($count = count($commitOrder), $i = $count - 1; $i >= 0; --$i) {
for ($count = count($commitOrder), $i = $count - 1; $i >= 0 && $this->entityDeletions; --$i) {
$this->executeDeletions($commitOrder[$i]);
}
}