Skip to content
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

Sorting not honored with JPA and Db2 #2194

Closed
ajaypaul-ibm opened this issue Jul 2, 2024 · 1 comment
Closed

Sorting not honored with JPA and Db2 #2194

ajaypaul-ibm opened this issue Jul 2, 2024 · 1 comment

Comments

@ajaypaul-ibm
Copy link
Contributor

When running a Jakarta Data test against Db2 there is an issue with sorting not always being honored. To recreate, remove the @SkipIfSysProp(DB_DB2)in DataTest.java (/io.openliberty.data.internal_fat/fat/src/test/jakarta/data/DataTest.java)

@Test
  @SkipIfSysProp(DB_DB2) //Failing on Db2 due to eclipselink issue.
  public void testFindAndDeleteReturnsObjects() throws Exception {

This individual test can be run against Db2 with the following command:
./gradlew io.openliberty.data.internal_fat:buildandrun -Dfat.test.class.name=test.jakarta.data.web.DataTest -Dfat.test.method.name=testFindAndDeleteReturnsObjects -Dfat.bucket.db.type=DB2

The test should fail because a Package with id 70077 is returned first when Package with id 70071 should be returned first.

I was able to recreate this with just JPA here: https://github.com/mswatosh/persistence-recreates/blob/89d7083a370f9ce04884400661d6f35a07c4b47b/src/main/java/com/example/application/PersistenceService.java#L93

@ajaypaul-ibm
Copy link
Contributor Author

ajaypaul-ibm commented Oct 1, 2024

Closing this issue as it is resolved from Jakarta Data side

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant