-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Page has an incorrect total since 3.4.3 #3802
Comments
If you would like us to spend some time helping you to diagnose the problem, please spend some time describing it and, ideally, providing a minimal yet complete sample that reproduces the problem. |
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. |
Thank you for your response. I have attached a minimal yet complete sample. You will see that the repository query tests fails, because the total elements are 3 (equal to page size) instead of 10. You will see that the specification test succeeds. This is with If you change the version of I hereby conclude that there is a bug in If you need any more information, please let me know. |
This is a variant of #3784. Upgrading to Spring Data JPA 3.4.4 (in Spring Boot, setting |
Thanks for your time and your suggestion. It worked like you said :). |
We are using spring-data-jpa to perform a query using a JpaRepository that returns a Page object. I am seeing different behaviour with spring-data-jpa 3.4.2 compared to spring-data-jpa 3.4.3.
Use-case
3.4.2
3.4.3
I could not find anything in the release notes, and in my (not-so-informed) opinion the behaviour in 3.4.2 makes more sense. This feels like a bug to me.
I would appreciate any response, whether it's an explanation why this new result is better or whether it's a confirmation that I've indeed found a bug.
If this issue is not according to your standards, please let me know.
Edit
SimpleJpaRepository.readPage() returns a total of 44 independent of the specified page number (i.e. is correct).
JpaQueryExecution.doExecute() returns a total of 20/40/44 depending on the page number (i.e. is incorrect).
One of our endpoints does the search via a .findAll() call on a JpaRepository, which will trigger the SimpleJpaRepository.readPage() call, while another endpoint of us does the search via a custom method annotated with @query on a JpaRepository, which will trigger the JpaQueryExecution.doExecute().
Hopefully this helps. It helped me see that we have a possible work-around, though I still think there is a bug that should be resolved.
The text was updated successfully, but these errors were encountered: