Skip to content

Commit

Permalink
attempt a fix
Browse files Browse the repository at this point in the history
  • Loading branch information
goetas committed Nov 14, 2024
1 parent 43ce0be commit 7d1b24f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/UnitOfWork.php
Original file line number Diff line number Diff line change
Expand Up @@ -2473,13 +2473,13 @@ private function doRefresh($entity, array &$visited, ?int $lockMode = null): voi
throw ORMInvalidArgumentException::entityNotManaged($entity);
}

$this->cascadeRefresh($entity, $visited, $lockMode);

$this->getEntityPersister($class->name)->refresh(
array_combine($class->getIdentifierFieldNames(), $this->entityIdentifiers[$oid]),
$entity,
$lockMode
);

$this->cascadeRefresh($entity, $visited, $lockMode);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ class LazyEagerCollectionTest extends OrmFunctionalTestCase
protected function setUp(): void
{
parent::setUp();

$this->createSchemaForModels(
LazyEagerCollectionUser::class,
LazyEagerCollectionAddress::class,
Expand Down

0 comments on commit 7d1b24f

Please sign in to comment.