views:

367

answers:

1

Hi, 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.

A: 

I am feeling strongly against such a method of storing data. Cannot explain why however.

FractalizeR
I think this is more useful as a comment...
Skilldrick
Probably, but I am not sure. People often ask how to eat soup using a knife and I see no reason in giving replies.
FractalizeR