Hi all,
I have two entities E_A and E_B and three tables T_A, T_B1 and T_B2. (legacy table model, that's why there are more tables)
- E_A maps to T_A. - E_B maps to T_B1 and T_B2 where T_B2 is linked in with a <join> mapping. - There is a collection of E_Bs in E_A.
If I load all E_Bs, all entries of T_B1 are fetched, plus an inner join is made on T_B2. If I load all E_As using fetch mode "join" on the collection of E_Bs, all entries of T_A are fetched, plus an outer join is made on T_B1, plus an outer join is made on T_B2.
I need the join on T_B2 to be an inner join however, just like when loading E_Bs. I took the hibernate SQL statement, replaced the outer join with an inner join, executed in on the DB and got exactly the desired result. I cannot force Hibernate to do this, however.
Is there some logical necessity to make an outer join, or did I miss a way to configure hibernate?
Thanks for your help! Gerhard
|