我需要在我的類中爲DiscriminatorMap製作一個公式,因爲我有很多類,並且我無法對每個類進行區分。單表繼承 - 鑑別器映射
discr可以是類的名稱。
有可能嗎? (帶註釋,xml或其他)
/**
* @ORM\Entity
* @ORM\InheritanceType("SINGLE_TABLE")
* @ORM\DiscriminatorColumn(name="discr", type="string")
* @ORM\DiscriminatorMap({"MidUpperArmCircumference" = MidUpperArmCircumference", "KneeHeight" = "KneeHeight"})
*/
謝謝。
不認爲有一種方法來自動映射它,對不起 – Inoryy 2012-01-05 15:32:03
= /所以我會區分所有。謝謝! – Munir 2012-01-05 18:15:31