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'];