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.  [ 1 post ] 
Author Message
 Post subject: Alias on baseclass detached criteria
PostPosted: Tue Oct 13, 2009 11:20 pm 
Newbie

Joined: Sat Oct 03, 2009 1:57 am
Posts: 3
Hi

I have a mapping for events in a module class where event is the base class. Event is also sublclassed to interview which is a joined subclass. I do a query on modules which has a list of events as a property, and when the query is generated the sql instead of doing a join between module and events, it does a left outer join with the interview class, even though the interview class isnt referred to. My hunch is that you cant do alias on the base class, and that nhibernate then works out any path it can find to join the two tables, ie module and interview that it can.

Can I do an alias on a base, with a joined subclass mapping? If I can how can I force it to use the base class and not a subclass

Thanks in advance, Ive been all over this and the only work around Ive got is to use subqueries and split the query out


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

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.