Implements Jakarta Persistence 3.2#144
Conversation
* removed TestSecurityContext because it is terminally deprecated since 17 and already removed in current JDK versions * updated h2-2 test profile jdbc url to remove strict definition * updated openjpa-slice and openjpa-xmlstore pom system variables definitions * updated GH actions workflows to use test-h2-2 profiles
* Project passes tests on derby, h2-2, postgres:latest, mysql:lts, mariadb:lts
* Updated dependency version * Added API new methods to API implementation classes with methods that throw UnsupportedOperationException, except for four methods in EntityManagerImpl that required proper implementations to pass tests * Project is still passing tests on derby and postgresql, at least
* Added XML JPA 3.2 schema and definitions * Added configuration support by 3.2 version * Added SchemaManager impl and corresponding methods in BrokerFactory interface * Added concrete working (not for h2-2) implementation of SchemaManager methods for JDBCBrokerFactory * Added concrete working impl for EMF#getName()
* Reverting unnecessary changes * Fixing broken map synchronization
* Changing signature of BrokerFactory API on schema dealing validate method * Adding test to check if validate operation throws exception when it fails * Changing GH CI workflow to allow usage of both self-hosted and GH hosted runners * Tested on derby, h2-2, postgresql:latest, mysql:lts, mariadb:lts
* Implementing emf creation passing PersistenceConfiguration
* Removing unused import in BrokerImpl * Implemented new PersistenceUnitUtil load methods
* Moved PUU loading tests to test unit already present * Updated test unit to junit 4.x format
* Original impl was wrongfully dependent of persistence.xml file * Fixed this issue, but still lacking actual conversion of PersistenceConfiguration properties to openjpa corresponding properties
…iguration) method
* added update OracleDictionary to use unqualified table name from main * added temporary file information disclosure vul-fix from main
…tence.xml * Added tests of specifications supported * Added support for scope and qualifiers in PersistenceUnitInfo and persistence.xml
Added function and corresponding tests, but MySQL still fails in tests. Passed on h2-2, pg, mariadb.
Oracle Database does not support TIME data type, nor CURRENT_TIME or EXTRACT(QUARTER) functions, so the associated tests must be skipped.
|
Hello All, so far testing matrix seems to be OK: Oracle was skipped due to I, sort of, scared of it :) (waiting for 2 weeks last time ... :)) Postgres: which is weird, but I have no idea how it can be fixed (and why is it differs from I'll try to run TCK |
|
@rzo1 are there any changes required to address unresolved comments from @rmannibucau ? |
Most likely as I wrote: Would most likely be beneficial to do the additional check for @ Version instead of swallowing (and if no OptimisticLock possible, just return 0 - but got no feedback on it so far ;-) ) |
|
I ran profile test-derby with jdk17 with no issues. Checking the github logs, it seems the problem was that elusive ghostly kubernetes error again. Still running oracle tests (on oracle-xe-18 and oracle-xe-21) |
|
Hello All, here are results of my TCK run:
At I'll try to investigate and improve script to work with some other DBs |
|
I've added test to easily reproduce I believe we need to create OpenJPA impl for |
|
I've added validator and now got following Exception: |
|
How do you run the tests exactly? They require quite a lot of properties 🙃 |
|
I'm using: As I understand for some reason |
|
@solomax I looked into the That's also why the TCK runs this single test in the separate Re Verified A/B/A on |
|
You are right @rzo1, for whatever reason the test was red for me Reverted and I'll try to add parametrization and perform more tests |
|
I am currently looking into my suggestion regarding Romains comment. |
…thout a version, so optimistic lock failures still surface Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Just commited updated My results are: I'll try to take a look at all this later :) |
|
Kubernetes flukes aside, Oracle build is now green, skipping only tests where there is no database support (TIME data type, CURRENT_TIME and EXTRACT(QUARTER from)). Ran the tests on oracle-xe-18 and oracle-xe-21. |
|
It seems some errors in MySQL TCK tests are caused by: While trying to persist entity with: @Column(name = "CHARDATA")
protected char characterData;Table is create with: CREATE TABLE DATATYPES (ID INTEGER NOT NULL, BOOLEANDATA SMALLINT NULL, CHARDATA CHAR NULL, SHORTDATA SMALLINT NULL, INTDATA INTEGER NULL, INTDATA2 INTEGER NULL, LONGDATA NUMERIC NULL, DBLDATA DOUBLE PRECISION NULL, FLOATDATA REAL NULL, ENUMODATA INTEGER NULL, ENUMSDATA VARCHAR(25), BYTEDATA SMALLINT NULL, TRANS SMALLINT NULL, BYTEARRAYDATA BLOB, CHARARRAYDATA VARCHAR(448), CONSTRAINT PK_DATATYPES PRIMARY KEY (ID) ) ENGINE=innoDB DEFAULT CHARSET=latin1 !java oblect is created with: char[] cArray = { 'a' };
byte[] bArray = { (byte) 100 };
d1 = new DataTypes(1, false, (byte) 100, 'a', (short) 100, 300, 600L, 50D, 1.0F, cArray, bArray);Something weird :((( |
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.