I would like to left outter join on a table (profile) with two other unrelated reference tables Could you please help me to write the HQL query I am using the latest version of hibernate 3.3 , spring 3.0 and java 5
select p.id,p.name, c.value, b.value from profile p left outer join ref_business_type b on p.business_type_code = b.code and b.locale ='en_CA' left outer ref_city c on c.city_code = c.code and c.locale ='en_CA' where p.id > 1
profile table id, name, business_type_code, city_code
ref_business_type table id, code, value, locale
ref_city table id, code, value, locale
|