Hi,
I tried to write HQL for the following SQL:
SELECT * FROM TABLE1 table1
LEFT OUTER JOIN
TABLE2 table2 ON table1.x = table2.x
LEFT OUTER JOIN
TABLE3 table3 ON table1.x = table3.x
where table1.y = ?
table1.x is not a primary key but all these three tables will be joined through their column x. table2 and table3 may not have such a row.
By the way, there is no relationship definitions on mapping files for column x (since it is not a foreign or a primary key).
Did anybody write such an HQL?
Thanks.
|