Given this HQL:
"select p, p.department from Person p left outer join p.department"
I would expect to get results for Person's who have a null department ID.
But instead the generated SQL is adding an inner join clause, filtering out those Persons without a department.
select person0_.ID as ID1_1_0_, department2_.ID as ID1_0_1_, person0_.NAME as NAME2_1_0_, person0_.DEPARTMENT_ID as DEPARTME3_1_0_, department2_.NAME as NAME2_0_1_ from PERSON person0_ left outer join DEPT department1_ on person0_.DEPARTMENT_ID=department1_.ID inner join DEPT department2_ on person0_.DEPARTMENT_ID=department2_.ID
That second inner join seems incorrect.
This seems to be similar, if not the same as
HHH-9284
and
HHH-8980
which were closed as fixed in 4.3.6. But the above scenario occurs in 4.3.6.
|