Doctrine table class inheritance when one subclass has no extra attributes

前端 未结 5 1557
情歌与酒
情歌与酒 2021-02-13 02:31

I\'m having a problem with my mapping. I can\'t get it to work. I have an abstract base class like so:

/**
 * @Entity
 * @Table(name=\"actions\")
 * @Inheritance         


        
5条回答
  •  谎友^
    谎友^ (楼主)
    2021-02-13 03:02

    I also ran into this problem, but I just added some dummy properties into my inherited entity, thinking it can be useful any time. I know its not the perfect idea, but it helped me keep my data model intact and give me the possibility to have own properties in the inherited entities in the future.

提交回复
热议问题