1
0
mirror of synced 2025-02-02 21:41:45 +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 dfbc6bbea3
commit cd746beae2

View File

@ -2418,6 +2418,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)) {