-->
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: hiberate one-to-many problem, left join problem in oracle
PostPosted: Tue Apr 26, 2005 2:44 am 
Newbie

Joined: Tue Apr 26, 2005 2:22 am
Posts: 5
hibernate 2.1.8, oracle 9

father and children is one-to-many.

select * from father a left join children b on a.id = b.fatherid where b.name = 'kurt'
select * from father a left join children b on a.id = b.fatherid and b.name = 'kurt'

the results generated by the two sqls above is totally different.
in first sql, the left join doesn't work. in second sql,the left join works, and i get the correct results.

in one-to-many, hibernate can only generate the first sql.
so how can i get the second sql in hibernate. thanks in advance.


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.