Just want to confirm -- nHibernate doesn't support <subclass> in <joined-subclass>?
What do people do when a class a) implements an interface and b) is the base class of an inheritance hierarchy? E.g. Domain Classes: We have classes B and C that are subclasses of A (abstract class). And we have classes A and D (concrete class) implement the interface, iE. Database: We treat the iE interface and the classes (A and D) that implement it as table-per-subclass inheritance; this gives us tblE, tblA, and tblD, with tblA and tblD w/ FK_E_ID. The A-B,C inheritance hierarchy is implemented as table-per-class-hierarchy; therefore, we have tblA or A, B, and C w/ TypeName as discriminator. Class mapping: Initially, I had the interface class mapping as the primary mapping with <class name="iE">. It had <joined-subclass name="A"> and, under this joined-subclass, the A-B-C inheritance hierarchy was implemented as table-per-class-hierarchy with <subclass> elements. This didn't work, though.
Thanks,
Bill
_________________ metazone
|