单表继承 - 鉴别器映射

Mun*_*nir 0 symfony doctrine-orm

我需要在我的课堂上为DiscriminatorMap制作一个公式,因为我有很多课程,而且我不能区分每一个.

区分可以是类的名称.

这是可能的?(带注释,xml或其他)

/**
* @ORM\Entity
* @ORM\InheritanceType("SINGLE_TABLE")
* @ORM\DiscriminatorColumn(name="discr", type="string")
* @ORM\DiscriminatorMap({"MidUpperArmCircumference" = MidUpperArmCircumference", "KneeHeight" = "KneeHeight"})
*/
Run Code Online (Sandbox Code Playgroud)

谢谢.