rzo1 opened a new pull request, #295: URL: https://github.com/apache/openjpa/pull/295
https://issues.apache.org/jira/browse/OPENJPA-2931 `cb.equal(join.get(Topic_.subject), subject)` with a composite-key entity failed with a NullPointerException in `EqualExpression`: since OPENJPA-2631 the store reads the metadata of the compared path, but `PathImpl` only set it on root paths. - `PathImpl` now sets path metadata the way the JPQL parser does: a path starting at a (join, correlated) variable carries the variable's metadata, traversing a field sets the metadata of the field's embedded or declared type. - Plural joins and `KEY()` of a map join carry the element / key metadata as well. - `EqualExpression` compares all primary key columns also for derived identities (first PK field is a relation), which only became visible once paths carried the target metadata, and no longer fails without metadata. New tests in `TestCompositePrimaryKeys` (join, correlated join, nested path, derived identity, plural join, map join key, JPQL parity); full `openjpa-persistence-jdbc` suite passes on Derby. Found on the way, not changed here: a path navigated from a correlated *root* in a subquery resolves against the subquery's candidate; that needs its own ticket. CI: the TCK and Databases workflows were started on this branch; this PR stays a draft until both pass. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
