-->
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: Joining tables problem.
PostPosted: Sat Mar 19, 2005 11:39 am 
Newbie

Joined: Sat Mar 19, 2005 11:22 am
Posts: 1
Hi,

I tried to write HQL for the following SQL:

SELECT * FROM TABLE1 table1
LEFT OUTER JOIN
TABLE2 table2 ON table1.x = table2.x
LEFT OUTER JOIN
TABLE3 table3 ON table1.x = table3.x
where table1.y = ?

table1.x is not a primary key but all these three tables will be joined through their column x. table2 and table3 may not have such a row.

By the way, there is no relationship definitions on mapping files for column x (since it is not a foreign or a primary key).

Did anybody write such an HQL?

Thanks.


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.