-->
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: Criteria API: Zusätzliche Join Bedingung
PostPosted: Tue Oct 17, 2006 9:30 am 
Newbie

Joined: Tue Aug 29, 2006 10:56 am
Posts: 15
Hallo,

ich möchte mittels der Criteria API eine zusätzliche Join Bedingung hinzufügen.

Das generierte SQL soll ungefähr so aussehen:

select
*
from
a as a
left outer join b as b
on a.id = b.id
and b.type='XY'
where
...

Wichtig ist, dass die Bedingung nicht in die where Bedingung kommen soll, da dort dann natürlich einige Ergebnissätze entfallen, falls es für irgendeine ids von a keine ids von b gibt.

Gruß

mba


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.