From b8c4a8ef9fa80444fa0549886de03b188d8f7a59 Mon Sep 17 00:00:00 2001 From: GitHub Date: Sat, 13 Jul 2024 10:32:25 +0000 Subject: [PATCH] [ui-module] Migrate UI module from separate repo (#265) --- src/Subscribers/EntityDiscriminator.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Subscribers/EntityDiscriminator.php b/src/Subscribers/EntityDiscriminator.php index ceb3b40..8c3dbf5 100644 --- a/src/Subscribers/EntityDiscriminator.php +++ b/src/Subscribers/EntityDiscriminator.php @@ -33,7 +33,7 @@ class EntityDiscriminator implements Common\EventSubscriber { - private const INHERITANCE_TYPE = 'SINGLE_TABLE'; + private const INHERITANCE_TYPE = ['SINGLE_TABLE', 'JOINED']; /** @var array */ private static array $discriminators = []; @@ -71,7 +71,7 @@ public function loadClassMetadata(ORM\Event\LoadClassMetadataEventArgs $event): if ( $inheritanceType instanceof ORM\Mapping\InheritanceType - && $inheritanceType->value === self::INHERITANCE_TYPE + && in_array($inheritanceType->value, self::INHERITANCE_TYPE, true) && $discriminatorMapExtension !== [] ) { $extendedDiscriminatorMap = $discriminatorMap?->value ?? [];