Hi Tom,
attached you find my changes to fix the JPQL query compiler bug 638
https://glassfish.dev.java.net/issues/show_bug.cgi?id=638
A query selecting a JOIN identification variable defined for a single
valued relationship field resulted in invalid SQL. It generated an outer
join even if the identification variable was defined as inner join and
the SQL outer joined the wrong side in the FK join clause.
I removed adding an extra ExpressionBuilder for such an identification
variable that was used when processing the SELECT clause. Now it
directly uses the expression created for the path expression of the JOIN
clause. Then we do not need the extra select expression cache in the
GenerationContext anymore. I removed this too.
The above also solves the problem of duplicated tables in the generated
tables:
https://glassfish.dev.java.net/issues/show_bug.cgi?id=197
The jar JPQL-fix638-060523.jar includes the entity-persistence changes.
The other jar adds a new test method to a query test class in
entity-persistence-tests. I extended the JUnitDomainObjectComparer and
added code to deal with nulls in the query result.
Thanks!
Regards Michael