-
Notifications
You must be signed in to change notification settings - Fork 345
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
Wrong query for selecting IDs for pagination #490
Comments
Hello, |
Hello. This is the DQL query:
Paginator then generates query for selecting IDs (results to be displayed). Problem is it should select
So in short - paginator selects |
Okay, it looks like the problem is more related to the query rather than to the paginator itself. Can you also explain the use case please ? What are you attempting to do ? |
There is a bug in query selecting IDs that are passed for query selecting paged items.
1st query = selecting count;
2nd query = selecting IDs that are selected in 3rd query ( using LIMIT ... OFFSET... )
3rd query = selecting items that are displayed
How to get to bug:
Lets say I have this query:
Entity\Gallery = media__gallery
Entity\Media = media__media
Entity\GalleryHasMedia = media__gallery_media
So basically what Im doing is selecting 'm' (Media) for displaying in paginated results.
The 2nd query thus should select not u0_id but m1_.id so it can be used in 3rd query in WHERE statement.
2nd query
What it does now is instead of filling WHERE with (m1.)_Media IDs its using (u0.)_UserGallery IDs...
3rd query
The text was updated successfully, but these errors were encountered: