-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Incorrect results when using EntityGraph with Paging #2920
Comments
Can you provide a minimal sample reproducing the problem using Spring Data JPA-only? A code base that contains the entity, repository, and a test that loads and verifies the outcome should be sufficient. You could also upgrade to Hibernate 6.2 to see whether the issue persists. |
If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed. |
Below is a minimal sample. The test should_paginate_properly_single_family will pass successfully, but the other will fail: Entity:
Repository:
Filter:
FilterDto:
Tests:
|
With Hibernate 6.2.5 I'm no longer able to reproduce the issue. Seems that Hibernate has fixed something. |
@mp911de can you specify the spring version as well. I am trying with Hibernate 6.2.5-Final and i am still getting the issue. and cannot see any solution for this issue as of now. |
Hi!
An issue I am not able to find a solution for, so any help will be highly appreciated:
I am using Spring Boot v3.0.5 with Hibernate 6.1.7. I am trying to use pagination when loading the list of entities together with their related entities in the same query by using EntityGraph. The list of entities is loaded with a single DB call, but the pagination returns different numbers for the total number of elements. The same behavior applies to the case when a many-to-many relationship is set up using an entity for the mapping table.
The request /api/roles?size=25 returns proper number for totalElements:
When requesting /api/roles?size=50, the result is:
The repository:
The entity:
The text was updated successfully, but these errors were encountered: