I have 3 classes. A holds B. C holds another B. A holds "many" C.
B can be null or not null. While I save B to database I use native sqlinsert, sqlupdate, vs.. queries.
If B is null, I can find A, i can find C, but I cannot find C's of A.
when I look at the sql text, I can see that hibernate makes inner join for the last case. I mean
select ... from A inner join B where b.join_column=c.join_column.
But because of c.join column is null, returns zero-sized list.
but for the first case
select ... from A left outer join B where b.join_column=c.join_column.
and it works as i expected.
Could you give any solution for it?
Thank you for your help in advance,
|