I'm using Doctrine 1.2 on a symfony project, and I'm considering mixing concrete and column aggregation inheritance types in my schema: column aggregation lets me query in a parent table and get both parent and child records, while concrete inheritance lets me get a cleaner schema. Plus, the mix will be in the same inheritance chain. How would I write the schema file? Like the following?
A:
B:
inheritance:
extends: A
type: concrete
C:
inheritance:
extends: B
type: column_aggregation
keyField: type
keyValue: 1
Or like this perhaps:
A:
B:
inheritance:
extends: A
type: concrete
C:
inheritance:
extends: B
type: concrete
D:
inheritance:
extends: C
type: column_aggregation
keyField: type
keyValue: 1
E:
inheritance:
extends: C
type: column_aggregation
keyField: type
keyValue: 2
Are there any dangers/caveats ?
As long as you avoid circular inheritance or diamond shaped inheritance you would be fine and can use this
A circular inheritance (obviously looks as follows
OR
A Diamond Shaped inheritance is a bit more round about. It happens when the following type of condition happens