-->
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: Hibernate migration help
PostPosted: Sat Aug 12, 2006 6:32 am 
Newbie

Joined: Sat Aug 12, 2006 5:17 am
Posts: 1
i am doing hibernate convertion.i want to convert the following sql query to hibernate.

If I use this join condition in named query it thro the mapping exception.Batch and Job table have one to many relation.how do i select the records from four table by using join conditions.How do I approach this problem?


select distinct job.BATCH_ID,job.JOB_ID,customer.NAME,quotation.QUOTATION_NO
from tbl_job job,tbl_batch batch,tbl_customer customer ,tbl_quotation quotation
where
job.BATCH_ID =batch.BATCH_ID and
customer.CUST_ID=batch.CUST_ID and
quotation.JOB_ID = job.JOB_ID and
job.JOB_STATUS ='YYY' and
job.CENTER_CODE ='XXX'


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.