/**
* @ORM\Entity
* @ORM\Table(name="persons")
* @@ORM\InheritanceType("JOINED")
* @ORM\DiscriminatorColumn(name="person_types", type="string")
* @ORM\DiscriminatorMap({
* "insuree" = "Insuree",
* "third_party" = "ThirdParty"
* })
*/
abstract class Person {
/**
* @ORM\Entity
* @ORM\Table(name="insurees")
*/
abstract class Insuree extends Person
/**
* @ORM\Entity
* @ORM\Table(name="third_parties")
*/
final class ThirdParty extends Insuree {
当我执行死刑的时候架构:创建,instad of document在Person类上创建discriminator列,创建persons表,其中包含属于自己的字段,不包含其他字段;然后,使用persons表列和属于自己的列创建被保险人表,然后使用第三方表中的列创建第三方表个人和被保险人表以及属于自己的列。当我执行EntityManager::flush()时,第三方表中的所有列都被填充,其他两个表都是空的。我错过了什么?我按照官方网站上的文件,似乎我把一切都做好了。