-->
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: Conditional outer join
PostPosted: Fri Jul 15, 2005 5:26 am 
Newbie

Joined: Fri May 13, 2005 9:07 am
Posts: 1
Hibernate version: 3.0.5

I'll use two simple tables to show my situation.

Code:
Product                            Translation
---------------------              ----------------------
id, pk                             id, pk
productCode, not null              language, not null
                                   entityCode, not null
                                   description, nullable



I need to produce an sql like the following one

Code:
select p.idProduct, t.description from product p left outer join translation t on p.productCode=t.entityCode and t.idLanguage=?



Can I do it with HQL or Criteria?

My problem is related to the conditional outer join.

Thanks for any help.


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.