I have two tables in my database:
The "Fund" entity inherits from "BaseEtity" with "table per type".
In my business model I have different types of "Fund":
I would like to have different entities for those types with "table per hierarchy", meaning that I still only have one "Fund" table with a type-discriminator column.
Is there a way to have "table per hierarchy" on an entity that derives from a base class with "table per type"?
Yes, it is possible - I have had this working in EF4 for some time now.
Define EntityA and map to TableA
Define EntityB: EntityA and map to TableB
Define EntityC: EntityA and map to TableC
Define EntityD: EntityC and map to TableC
with condition on a column from table C
Define EntityE: EntityC and map to TableC
with a different condition on a column from table C
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