Hi,
I am having trouble with bags and joined subclasses. Say I have four classes, A, B, C and D:
A is an abstract base class and B and C are joined subclasses. A has a many-to-one relationship to D using a foreign key
I want D to have a list of all linked instances of B and another list of all linked instances of C. Unfortunately NHibernate looks for the key in B or C and not in A. I get an "Invalid column name" exception.
Is there any way to achieve this? Or does my class design need to be changed? I know I could do it with queries but I would like to get a list of D and fetch the child lists at the same time. Apologies if I have not explained it very well.
Thanks,
James
|