From 2fd230fe9757b79ae8f4e62ba6c42ef05521de1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABl=20Mainchain?= Date: Thu, 2 Dec 2021 16:55:08 +0100 Subject: [PATCH] Fix inheritance for 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 7bbf2cf..19e2ecf 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 ($parentEntityFqcn === $assoc['targetEntity'] && $parentEntityProperty === $assoc['inversedBy']) { + if (is_subclass_of($parentEntityFqcn, $assoc['targetEntity']) && $parentEntityProperty === $assoc['inversedBy']) { // OneToMany association if (isset($assoc['joinColumns']) && 1 === \count($assoc['joinColumns'])) { $assocFieldPart = 'entity.'.$assoc['fieldName'];