-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Joined subclasses and bags
PostPosted: Wed Aug 20, 2008 4:56 am 
Newbie

Joined: Wed Aug 20, 2008 4:20 am
Posts: 5
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


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 21, 2008 4:16 am 
Newbie

Joined: Wed Aug 20, 2008 4:20 am
Posts: 5
Can this be done in NHibernate 2.0 perhaps?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.