rzo1 opened a new pull request, #206:
URL: https://github.com/apache/openjpa/pull/206

   `addNamedQuery` re-labelled a criteria query as JPQL and stored its CQL 
rendering, which OpenJPA has never guaranteed to be parseable: a quoted string 
literal or an unparenthesized subquery failed to parse on replay. The compiled 
criteria form is kept and replayed instead, so such queries work, and 
`getNamedQueries` now lists them. Two concurrency problems came out of review 
and are fixed: the criteria tree shares its mutable translation state across 
snapshots and subquery delegates, so translation is serialized on one lock 
identity shared by the whole tree and taken in a fixed order, and the replay 
path no longer renders the shared tree at all — the identifier is captured once 
at registration. A criteria query is also never held in the prepared query 
cache, since the cache keys on a rendering that cannot be parsed back. Verified 
on Derby and H2: 637 tests across the TCK, named-query, prepared-query-cache 
and criteria classes, no failures; the three swallowed exceptions in `addN
 amedQuery` are narrowed to what the specification defines.


-- 
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]

Reply via email to