Open beikov opened 2 weeks ago
Here is the fix https://github.com/jakartaee/platform-tck/pull/1325
The tests should be excluded from the 3.1 and 3.2 TCK.
List of Platform TCK tests for this challenge:
https://github.com/jakartaee/platform-tck/pull/1334 is for Persistence 3.1 + Jakarta EE 10 Platform TCK
Any Persistence 3.2 test excludes should be done by updating the tckrefactor
branch:
For reference see git commit 4eb2b298eaf2a954f3c7e38e1da2a8fb6c8f1b85
The staged https://www.eclipse.org/downloads/download.php?file=/ee4j/jakartaee-tck/jakartaee10/staged/eftl/jakarta-persistence-tck-3.1.5.zip contains an update for this TCK challenge.
The following list of tests is failing because the TCK assumes it can set a version property manually:
com/sun/ts/tests/jpa/core/annotations/version/Client.java#intFieldTest
com/sun/ts/tests/jpa/core/annotations/version/Client.java#intPropertyTest
com/sun/ts/tests/jpa/core/annotations/version/Client.java#integerFieldTest
com/sun/ts/tests/jpa/core/annotations/version/Client.java#integerPropertyTest
com/sun/ts/tests/jpa/core/annotations/version/Client.java#longClassFieldTest
com/sun/ts/tests/jpa/core/annotations/version/Client.java#longClassPropertyTest
com/sun/ts/tests/jpa/core/annotations/version/Client.java#longFieldTest
com/sun/ts/tests/jpa/core/annotations/version/Client.java#longPropertyTest
com/sun/ts/tests/jpa/core/annotations/version/Client.java#shortClassFieldTest
com/sun/ts/tests/jpa/core/annotations/version/Client.java#shortClassPropertyTest
com/sun/ts/tests/jpa/core/annotations/version/Client.java#shortFieldTest
com/sun/ts/tests/jpa/core/annotations/version/Client.java#shortPropertyTest
com/sun/ts/tests/jpa/core/annotations/version/Client.java#timestampFieldTest
com/sun/ts/tests/jpa/core/annotations/version/Client.java#timestampPropertyTest
The problem is in the various
createXTestData
methods that pass a non-null value in the entity constructors for the version. According to the JPA spec section 3.4.2:So the TCK violates the rules of the specification by setting the version.
Hibernate ORM leverages the nullity to determine whether an entity instance is detached or transient, which should be ok according to the specification.