This commit is contained in:
parent
b9b952ce8a
commit
68c5d761a8
1 changed files with 2 additions and 1 deletions
|
@ -3477,7 +3477,8 @@ class UnitOfWork implements PropertyChangedListener
|
|||
private function clearEntityInsertionsForEntityName($entityName)
|
||||
{
|
||||
foreach ($this->entityInsertions as $hash => $entity) {
|
||||
if (get_class($entity) === $entityName) {
|
||||
// note: performance optimization - `instanceof` is much faster than a function call
|
||||
if ($entity instanceof $entityName && get_class($entity) === $entityName) {
|
||||
unset($this->entityInsertions[$hash]);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue