Implements Jakarta Persistence 3.2 - #144
Conversation
…ptional in JPQL" implementation
…public and serializable
…nd named result set mappings to generated StaticMetamodel
…nd named result set mappings to generated StaticMetamodel
… list of defined annotations on StaticMetamodel
…ields of Java enums
… have Property access only Getter/Setters according to Java Bean Style should work.
…ed when a resource-local transaction is active, roll it back before closing. For managed transactions, defer closing until the transaction completes.
…OpenJPA created schema
I let Claude having a adversial review on this one. I would follow its suggestions and move that in a separate Jira to avoid bloating this PR ;-) This is the output: Looked into the four JavaCC warnings. Short version: two are a real, ~20-year-old First, a mapping note: jjtree preserves the original Warnings 1 & 2 —
Nothing downstream repairs it: Pre-existing, not from this branch: the block i and Fix is to recurse into the next-tighter product - ((<PLUS> arithmetic_expression() #ADD(2))
- | (<MINUS> arithmetic_expression(
+ ((<PLUS> arithmetic_term() #ADD(2))
+ | (<MINUS> arithmetic_term() #SUB
(and arithmetic_term → arithmetic_factor likewiarnings drop
4→2, trees become left-leaning, precedence preserved. I parsed a 1564-query corpus harvested
from the test sources under both parsers: 0 acc exactly 2
tree-shape differences, both TestJPQLScalarExpressions.java:121,130
(SUM(c.age) - MIN(c.userid) + MAX(c.userid)), wo won't catch
the change.
Note the LOOKAHEAD(2) that JavaCC suggests is the wrong fix — I verified it produces
byte-identical (still right-associative) trees.ithout fixing
anything.
Since this changes emitted SQL for unparenthesised chained arithmetic, I'd file it as its
own JIRA with a release note and tree-shape regrser currently has
no arithmetic associativity assertion at all.
Warnings 3 & 4 — "AVG" "(" / <IDENTIFIER> at 1533/1534 — new here, but inert.
In orderby_item(), alternatives 4-5 (orderby_extension(), identification_variable())
carry no LOOKAHEAD, so JavaCC resolves by firstuates
LOOKAHEAD(scalar_expression()) on alternative 6 — making that alternative dead for
AVG/MIN/MAX/SUM/COUNT and for bare identifiers.
Introduced jointly: f90549c15 (NULLS FIRST/LASTion() alternative
first, where its lookahead suppressed the warnings; a5d724993 (ORDER BY alias regression)
moved it below the two bare alternatives, which
But the affected queries fail on master too — O is a
ParseException there as well — so this is an unrealised extension, not a regression, and
a5d724993 was a genuine fix that shouldn't be r under-report the
real shape of the gap: ORDER BY a.balance * 2 and ORDER BY -a.balance fail too, silently,
via the lookahead-ful alternatives. |
…instead of the primary key
…s unversioned types with a clear message
|
All, There are lot's of unaddressed comments, but I'm afraid working on them in this PR is a pain :( Maybe it worth to merge this one and address remaining in a separate PR? Shall this one be squashed WDYT? |
I think people opted for not squashing to remain history. I am fine with merging, but we need a way to track the open stuff to avoid loosing it on the long run. Perhaps it would make sense to create JIRAs for the open things we need to fix ? (or we use AI to create a table of unresolved comments to aggregate them and than automtically create the JIRAs, wdyt?) |
|
@rmannibucau could you please mark all answered comments which doesn't require any further work as resolved? I can then try to move all remaining issues to the JIRA (hopefully I can do it with the links to the particular comment) |
|
Updated: 54 unresolved review threads, plus the MySQL TCK comment @solomax asked to include (last row). The Status = whether @rmannibucau's comment has been answered in-thread yet — Open means nobody has replied, so it still needs a decision before it can become a JIRA.
|
…licate values, guard lazy init
|
@rzo1 could you please add #144 (comment) to the table? And let's wait for @rmannibucau to resolve at least something from this huge table .... |
Updated + Status Column ;-) - so lets wait and update it so we can proceed with the Jiras later on. |
| @@ -97,6 +99,37 @@ public void testQueryTimeOutExceptionWhileQueryingWithLocksOnAlreadyLockedEntiti | |||
| } | |||
| } | |||
|
|
|||
| public void testLockTimeOutExceptionWhileQueryingWithLocksOnAlreadyLockedEntitiesOption() { | |||
There was a problem hiding this comment.
This test seems to hang for Oracle:8.4.0 is it by design?
What is the rule to set DBDictionary.supportsQueryTimeout ?
I've added TestTimeout == 30min for this test for now, not sure how to properly fix it :((
There was a problem hiding this comment.
same story with TestPessimisticLockException :(((
I think migrating to JUnit5 with @Timeout annotations might be good idea :)
There was a problem hiding this comment.
I 'd like to, but it's something we should deal after this release, don't you think?
There was a problem hiding this comment.
I 'd like to, but it's something we should deal after this release, don't you think?
+1
|
Hello All, I have created https://issues.apache.org/jira/browse/OPENJPA-2945 and all remaining issues as it's subtasks @cristof please merge this one :) this honor is yours :) I hope to get your and @rzo1 help on resolving remaining issues :) |
|
Merging, as requested. Sure will help with the issues! |
Hi! This work is an effort to implement JPA 3.2. I've started it a long time ago. Richard Zowalla picked it up and, with AI help (Claude), implemented the missing features, including some JPA <3.0 that weren't implemented.
I've tested it against default database, h2, mariadb(lts) e postgresql (18).
Please, check it against your favorite DB so we may fix some edge cases. It would be great if you can run TCK to be sure of the implementations.