-->
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: Need help writing a query with a join.
PostPosted: Thu Jul 26, 2007 3:10 am 
Newbie

Joined: Thu Jul 12, 2007 1:13 am
Posts: 17
Hi ,
I need help creating a join betwwen two tables in the HQl query.
I have one table TableA and other TableB both have a column dealid common.In first table this is a primary key but in the second table though this column is there but I have not put a foreign key constraint for this particular column. I'm writing a query like this


Code:
<query name= "xyz">
   <![CDATA[
from TableA join TableB on TableA.dealid = TableB.dealid
              ]]>
</query>



Are there additional attributes that's needs to be added in the class files for these two table or something else have to be done. I know it's a simple thing but some how I'm not able to make the join and get the Data.Plz if possible tell me all the steps or give me a link as to how to make joins.


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.