Clear entityInsertions for specific entityName
This commit is contained in:
parent
dfbc6bbea3
commit
cd746beae2
1 changed files with 7 additions and 0 deletions
|
@ -2418,6 +2418,13 @@ class UnitOfWork implements PropertyChangedListener
|
|||
$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)) {
|
||||
|
|
Loading…
Add table
Reference in a new issue