Java Mailing List Archive

Home » users.openjpa »

found a bug in criteria API left join and a solution

Henno Vermeulen


Author LoginPost Reply

There is a bug in the Criteria API where a LEFT JOIN that follows another join (tested for INNER JOIN) gets actual SQL that uses an INNER JOIN.
This was already reported by someone else as OPENJPA-2318 and OPENJPA-2317

I investigated the issue myself and created a small OpenJPA unit test. I also think that I found the exact cause of the problem and the solution to it.
It's a simple matter of replacing two literal values of "false" that should probably have been "allowNull" which is true in case of a left join.

Can someone confirm that this means the bug will be fixed in an upcoming release? I believe it's a simple matter of perform this change and verifying that no existing tests are broken.

See my comments in

Thank you,
©2008 - Jax Systems, LLC, U.S.A.