-
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
FindAll by Pageable the countQuery was missing condition #3635
Comments
Thank you @smokeInCloud060201 for getting in touch. Please take the time to provide a complete minimal sample (something that we can unzip or git clone, build, and deploy) that reproduces the problem. |
Hi @christophstrobl. I understand why. I don't override the toPredicate() method
I do
and use this specs to findAll. That is reason. But have a little bit strange that's not at all Entity was missing. I use it for some Entity class but only one was missing. |
And I also get a new issue. I don't know should I create new issue or tell it in hear.
or something like that. I fixed that by use Hibernate feature instead JPA now, but I don't know if you already fix that or have plan to do that |
Still waiting for a functional sample. |
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. |
I am using
SpringBoot-Starter-Data-JPA-Version: 3.3.3
. When I usePage<T> findAll(@Nullable Specification<T> spec, Pageable pageable)
, I will get 2 queries. The first query is correct, but the second query, with it's use to count total elements was missing a condition..The first query SQL result:
The second query, use to count total elements result:
The condition
and w1_0.status in (?, ?, ?, ?)
was missing in the countQuerySo when I try to use findAll() to pageable will get incorrect result.
The text was updated successfully, but these errors were encountered: