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 everything 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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With