-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Closed
Description
Hi, after upgrading to 2.9 (from 2.8) I now get an error when validating my schema
My setup is the following
Parent
/**
* @ORM\Entity
* @ORM\InheritanceType("SINGLE_TABLE")
* @ORM\DiscriminatorColumn(name="discriminant", type="string")
* @ORM\DiscriminatorMap({
* "type_child_a" = ChildA::class,
* "type_child_b" = ChildB::class,
* "other_type" = OtherType::class
* })
*/
abstract class ParentAbstractType
/**
* @ORM\Entity
*/
abstract class AbstractType extends ParentChildA
/**
* @ORM\Entity
*/
class ChildA extends AbstractTypeChildB
/**
* @ORM\Entity
*/
class ChildB extends AbstractTypeOtherType
/**
* @ORM\Entity
*/
class OtherType extends ParentMy issue is that after upgrading to 2.9, when validating the schema I now get the error
Entity class 'AbstractType' is part of inheritance hierarchy, but is not mapped in the root entity 'Parent' discriminator map. All subclasses must be listed in the discriminator map.
If I'm not mistaken, doctrine shouldn't expect AbstractType to be in the DiscriminatorMap because it is an abstract class?
If it wasn't supposed to be working before, do you have an alternative to achieve my desired outcome?
Thank you!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels