We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When doing an orderBy using a sub query and using cursor pagination i get this error
array_flip(): Can only flip string and integer values, entry skipped
The error is coming from here
framework/src/Illuminate/Pagination/AbstractCursorPaginator.php
Line 199 in 453508e
By the way using the same query with other paginators works perfectly fine
Model::orderBy( SomeOtherModel::select('name')->whereColumn('model.id', 'some_other_model.model_id') )
The text was updated successfully, but these errors were encountered:
This isn't supported. A cursor based paginator needs a column with unique values to order.
Sorry, something went wrong.
@driesvints From my understanding cursor pagination does not stop you from using additional order by other then the primary key order by.
So this is the query that i'm aiming for
select * from coursesorder byidasc, (selectnamefromsubjectswheresubjects.id=courses.subject_id) asc limit 16
select * from
order by
asc, (select
from
where
.
=
) asc limit 16
Having two order by is not supported ?
Sub queries aren't supported no. You're always free to attempt to make it work through a pr if you wish.
No branches or pull requests
Description:
When doing an orderBy using a sub query and using cursor pagination i get this error
array_flip(): Can only flip string and integer values, entry skipped
The error is coming from here
framework/src/Illuminate/Pagination/AbstractCursorPaginator.php
Line 199 in 453508e
By the way using the same query with other paginators works perfectly fine
Steps To Reproduce:
The text was updated successfully, but these errors were encountered: