教義エンティティを拡張し、それを永続化するphpクラスを持つことは可能ですか?
例:
/**
* @Entity
*/
class A {
/**
* @ORM\ManyToMany(targetEntity="C", mappedBy="parents")
*/
protected $children;
}
class B extends A {
...
}
class C {
/**
* @ORM\ManyToMany(targetEntity="A", inversedBy="children")
*/
protected $parents;
}
$b = new B();
$em->persist($b);