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'
|