Skip to content

Commit

Permalink
[CoreBundle] restore managed entities of no merge is defined
Browse files Browse the repository at this point in the history
  • Loading branch information
dpfaffenbauer committed May 6, 2024
1 parent 6ca7def commit b4e1ab3
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,9 @@ static function ($assoc) {
$id = $relatedEntityClass->getIdentifierValues($relatedEntities);
$uwEntity = $this->em->getUnitOfWork()->tryGetById($id, $relatedEntityClass->getName());

$class->reflFields[$assoc['fieldName']]->setValue($entity, $uwEntity);
if ($uwEntity) {
$class->reflFields[$assoc['fieldName']]->setValue($entity, $uwEntity);
}
}
}

Expand Down

0 comments on commit b4e1ab3

Please sign in to comment.