1
0
mirror of synced 2025-01-18 22:41:43 +03:00

Merge pull request #962 from netiul/master

Stop executeDeletions when there is nothing to to delete anymore
This commit is contained in:
Benjamin Eberlei 2014-03-23 15:32:28 +01:00
commit a03c8da683

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]);
}
}