Unexpected pagination behavior #39869
Unanswered
xanderificnl
asked this question in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi.
Yesterday I ran into an issue where a wildcard kept getting added to my query. During a xdebug session I learnt that
cursorPaginate
was adding the wildcard and that its function signature included$columns = ['*']
. I also searched for issues and found this one, from 3 days ago: #39807This is the code that resulted in unexpected behaviour:
I believe the real issue here is that the paginator is causing an undesired result by adding a (wildcard) select. It should only set
limit
andwhere
/offset
and leave the rest to the developer, or query builder.Is there a (good) reason for the paginator to select columns? If not, I would like to suggest depreciating the
$columns
parameter in favour of using the query builder.Beta Was this translation helpful? Give feedback.
All reactions