1
0
mirror of synced 2025-02-03 05:49:25 +03:00

Clear entityInsertions for specific entityName

This commit is contained in:
Rico Humme 2016-06-03 13:48:05 +02:00 committed by Marco Pivetta
parent 90b7450747
commit 70603ee3db

View File

@ -2401,6 +2401,13 @@ class UnitOfWork implements PropertyChangedListener
$this->doDetach($entity, $visited, false); $this->doDetach($entity, $visited, false);
} }
} }
foreach ($this->entityInsertions as $hash => $entity) {
if (get_class($entity) != $entityName) {
continue;
}
unset($this->entityInsertions[$hash]);
}
} }
if ($this->evm->hasListeners(Events::onClear)) { if ($this->evm->hasListeners(Events::onClear)) {