From 76ff717d5854e00f6145c834b32390e9630d3c44 Mon Sep 17 00:00:00 2001 From: Asmir Mustafic Date: Mon, 26 Sep 2022 13:16:38 +0200 Subject: [PATCH] attempt a fix --- src/UnitOfWork.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/UnitOfWork.php b/src/UnitOfWork.php index 2969a3e0e0f..0f775910d83 100644 --- a/src/UnitOfWork.php +++ b/src/UnitOfWork.php @@ -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); } /**