-->
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: Outer join in a many-to-many
PostPosted: Mon Aug 14, 2006 10:06 am 
Newbie

Joined: Mon Aug 14, 2006 9:22 am
Posts: 4
Hibernate version:3.1.2
Database:Oracle 10g

Got a many-to-many with a link table containing 2 ids.
TableA (idA)
LinkTable (idA, idB)
TableB (idB, aDateField)

Trying to get A and all related B's but only where TableB.aDateField > passedInDate and for a particular idA.
I want to get A even if it contains no B's for the above criteria - so it would seem sensible to use an outer join.
I'm using the following criteria :
"from A a left outer join fetch a.B b where a.idA = 1 and b.aDateField > '14-Aug-06'".

I get nothing returned and suspect it's something to do with the link table.
Is it possible to do what I want ?


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.