Skip to content

Commit

Permalink
doctrine#10869 fix double insert once entity
Browse files Browse the repository at this point in the history
  • Loading branch information
dbannik committed Aug 16, 2023
1 parent 5577d51 commit 573a868
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/Doctrine/ORM/UnitOfWork.php
Original file line number Diff line number Diff line change
Expand Up @@ -1167,6 +1167,10 @@ private function executeInserts(): void
$entities = $this->computeInsertExecutionOrder();

foreach ($entities as $entity) {
if (! in_array($entity, $this->entityInsertions, true)) {
continue;
}

$oid = spl_object_id($entity);
$class = $this->em->getClassMetadata(get_class($entity));
$persister = $this->getEntityPersister($class->name);
Expand Down

0 comments on commit 573a868

Please sign in to comment.