-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Derived identity TCK tests rely on unspecified cascading behavior #632
Comments
…ations part of the id
The issue here is that an entity in the persistent state must have a well-defined persistent identity. Yes, right from the very moment that But in these tests, that's not the case: the dependent objects do not have a well-defined persistent identity when they are made persistent, their persistent identity can only be determined after the One supposes that other JPA implementations, like Hibernate, have hacks around these TCK tests, but those hacks are not correct. |
@lukasj do you expect that we will try to make further Persistence 3.2 test changes like jakartaee/platform-tck#1309 which is for this challenge? |
Please exclude the tests from the next 3.1 and 3.2 TCK builds. |
…ations part of the id
Fix jakartaee/persistence#632, Don't assume persist cascading for associations part of the id
Impacted 3.1 tests (for EE 10 Platform TCK testing) would be: com/sun/ts/tests/jpa/core/derivedid/ex1a/Client.java#DIDTest_from_appmanaged com/sun/ts/tests/jpa/core/annotations/mapsid/Client.java#persistMX1Test1_from_appmanaged |
…y on unspecified cascading behavior and increment the JPA TCK version Signed-off-by: Scott Marlow <[email protected]>
jakartaee/platform-tck#1334 is for Persistence 3.1 + Jakarta EE 10 Platform TCK |
Any Persistence 3.2 test excludes should be done by updating the
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 tests rely on unspecified cascading behavior of the
@MapsId
annotation:ee.jakarta.tck.persistence.core.derivedid.ex1a
ee.jakarta.tck.persistence.core.derivedid.ex1b
ee.jakarta.tck.persistence.core.derivedid.ex2b
ee.jakarta.tck.persistence.core.derivedid.ex3a
ee.jakarta.tck.persistence.core.derivedid.ex3b
ee.jakarta.tck.persistence.core.annotations.mapsid
After fixing a Hibernate issue, we realized that the spec does not define this behavior and that assuming
CascadeType.PERSIST
for associations that are part of an entity id is not correct.The mentioned tests essentially assume that persist cascading is applied. By reordering the
persist
calls in the test, this wrong assumption can be fixed. Interestingly, a few similar other tests e.g.ee.jakarta.tck.persistence.core.derivedid.ex4a
andee.jakarta.tck.persistence.core.derivedid.ex4b
do not rely on such behavior, so maybe this behavior was assumed by accident?The text was updated successfully, but these errors were encountered: