htmlizer take into account noLoad

This commit is contained in:
Yuri Kuznetsov
2022-12-17 10:42:42 +02:00
parent 3bd73f16a8
commit 8bc34aab9b

View File

@@ -480,9 +480,15 @@ class Htmlizer
$orderData = $this->getRelationOrder($entity->getEntityType(), $relation);
$entityDefs = $this->entityManager
->getDefs()
->getEntity($entity->getEntityType());
if (
$entity instanceof CoreEntity &&
$entity->hasLinkMultipleField($relation)
$entity->hasLinkMultipleField($relation) &&
$entityDefs->hasField($relation) &&
!$entityDefs->getField($relation)->getParam('noLoad')
) {
return $this->entityManager
->getRDBRepository($entity->getEntityType())