-->
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: many-to-many outer join
PostPosted: Fri Nov 25, 2005 9:16 am 
Newbie

Joined: Thu Nov 24, 2005 9:57 am
Posts: 4
Location: Fribourg (Switzerland)
Hi!

I'd like to have an outer-join on a many-to-many association.

I tried the fetch and outer-join parameters in my mapping file, but the select that is get back is still the same (without outer join).

Here is my code :

<set name="disciplines" table="STI_STIFTUNG_DISCIPLINE" >
<key column="STI_ID"/>
<many-to-many class="Discipline" column="DISC_ID" />
</set>


Does somebody have a solution ?

Thanks in advance.

Joce


Top
 Profile  
 
 Post subject:
PostPosted: Sat Nov 26, 2005 6:34 am 
Beginner
Beginner

Joined: Tue Oct 18, 2005 3:57 pm
Posts: 48
Location: Los Angeles, CA
HQL always ignores the mapping document eager fetch setting.

You can:

1) set outer joins to true in your mapping file and use Criteria queries, or

2) use "outer join" in HQL queries
Code:
from XXX x outer join Discipline d where ....


jd


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.