From fe1816406322ee5ce43c785308ea24a4e6987b39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABl=20Mainchain?= Date: Mon, 6 Dec 2021 11:51:15 +0100 Subject: [PATCH] Fix embedded list --- src/Helper/EmbeddedListHelper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Helper/EmbeddedListHelper.php b/src/Helper/EmbeddedListHelper.php index 19e2ecf..ba46861 100644 --- a/src/Helper/EmbeddedListHelper.php +++ b/src/Helper/EmbeddedListHelper.php @@ -103,7 +103,7 @@ public function guessDefaultFilter(string $entityFqcn, string $parentEntityPrope $parentEntityFqcn = ClassUtils::getRealClass($parentEntityFqcn); foreach ($entityAssociations as $assoc) { // If association matches embeddedList relation - if (is_subclass_of($parentEntityFqcn, $assoc['targetEntity']) && $parentEntityProperty === $assoc['inversedBy']) { + if (($parentEntityFqcn === $assoc['targetEntity'] || is_subclass_of($parentEntityFqcn, $assoc['targetEntity'])) && $parentEntityProperty === $assoc['inversedBy']) { // OneToMany association if (isset($assoc['joinColumns']) && 1 === \count($assoc['joinColumns'])) { $assocFieldPart = 'entity.'.$assoc['fieldName'];