Sorry, seems like my last copy & past action acidentially submitted the bug report before completing it
The JPA query
SELECT NEW test.IdValue(a.name, m.value) FROM A AS a LEFT JOIN a.keyValue AS m WITH KEY(m)=?1 ORDER BY a.name
results in SQL:
select a0_.name as col_0_0_, b2_.value as col_1_0_ from A a0_ left outer join A_B keyvalue1_ on a0_.id=keyvalue1_.A_id and ( keyvalue1_.key=? ) left outer join B b2_ on keyvalue1_.keyValue_id=b2_.id and ( keyvalue1_.key=? ) order by a0_.name
It is essential for the application to get null rows for entities which do not have an entry for key "m" so I cannot use WHERE KEY(m)=?1
See my attached test case
I think it is related with
HHH-8551
and the related commit
|