I am new to hibernate. I have three tables to join and one of the table involves outer join.
MY SQL is like this,
SELECT DISTINCT FORM.FORNAME,
FORM.FORPKGNM,
FORM.FORPKGUM,
FORM.FOODMH,
FORM.FOUDIND,
ADMKEY
FROM IDVPCS01.ITDRUGS DRUG
JOIN IDVPCS01.ITFORM FORM ON DRUG.DMUMNEM = FORM.FORMNEM
LEFT OUTER JOIN (SELECT ADMKEY
FROM IDVPCS01.ITADMINV WHERE HOSPNO = '0455' AND WARDNO = 'A') TEMP
ON DRUG.DMADMKEY = ADMKEY WHERE FORM.FORNAME LIKE 'TYL%' ;
How do I wirte the mapping file for this? I have three databeans for each tables. Is the column names matters in the mapping file? Our table coumn names in join criteria is not same.
For e.g, from the above query FORMNEM - from FORM table, DMUMNEM - from Drug table. DMADMKEY - from Drug table, ADMKEY - from ADMINV table.
|