hibernate 2.1.8, oracle 9
father and children is one-to-many.
select * from father a left join children b on a.id = b.fatherid where b.name = 'kurt'
select * from father a left join children b on a.id = b.fatherid and b.name = 'kurt'
the results generated by the two sqls above is totally different.
in first sql, the left join doesn't work. in second sql,the left join works, and i get the correct results.
in one-to-many, hibernate can only generate the first sql.
so how can i get the second sql in hibernate. thanks in advance.
|