开发者

PHP Doctrine Inheritance

I'm reading through the Doctrine documentation but I can't find a way to implement the type of inheritance I want to use.

I would like to set up a hierarchy like so:

Node -> Something -> Something Else

With Node being the main parent.

I would like to store data common to everythin开发者_开发问答g in a node table, eg date of creation, update etc rather than storing this same information in every table. The child classes would then have varying properties depending on their purposes.

Doctrine's simple and column_aggregation methods do not appear to be able to create new tables for the child classes, whilst the concrete method makes a new table but copies all of the parent's properties.

Is there a way to achieve this?

Any advice appreciated.

Thanks.


Doctrine 2.x supports class table inheritance, which is what you want here.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜