-->
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.  [ 3 posts ] 
Author Message
 Post subject: Advice/question on joins
PostPosted: Wed Sep 07, 2005 5:39 am 
Newbie

Joined: Tue Aug 09, 2005 10:29 am
Posts: 10
Howdy all!

I've got a join question that I can't seem to be able to figure out.
I have two tables, both O/R mapped. There is no mapping relation between them. Now I want to do a (left) join between them but I can't figure out how.
In SQL it would be 'select * from table1 left join table2 on table1.id = table2.id where table1.id = <something>'.

All the examples I've seen implies that there already is a mapping between table1 and table2. Is this correct? Must there be a mapping between table1 and table2?

I've tried various permutatins of HQL without success.
Right now I'll take any suggestion.

cheers
Erik


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 07, 2005 9:32 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
You need to use native SQL, or map the relationship and use HQL


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 07, 2005 9:43 am 
Newbie

Joined: Tue Aug 09, 2005 10:29 am
Posts: 10
david wrote:
You need to use native SQL, or map the relationship and use HQL


OK, thanks for the answer.

cheers
/Erik


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

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.