inheritance - How to create an empty superclass with unknown subclasses for Doctrine in Symfony? -
as far understand if want utilize inheritance doctrine requires list subclasses in supperclass mapping information.
the manual states:
/** * @entity * @inheritancetype("single_table") * @discriminatorcolumn(name="discr", type="string") * @discriminatormap({"person" = "person", "employee" = "employee"}) */ class person { // ... }
the @inheritancetype, @discriminatorcolumn , @discriminatormap must specified on topmost class part of mapped entity hierarchy.
as i'm developing symfony bundle reused multiple applications, major problem. i'd provide super classes can extended applications. means subclasses not known @ time implement superclass.
question creating portable bundles extendable entities in symfony2 addressing same problem.
the question here is: what options have come around limitation?
on of areas i'm having need order. application should have possibility implement it's own order item subtypes. came solution, requires lot of classes inheritance.
i'd happy see better/shorter solutions.
inheritance symfony2 doctrine2
No comments:
Post a Comment