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?
to your account
To paginate, I'm using query.clone().count('* as count'), but because the query has an ORDER BY, I'm getting an error: "must appear in the GROUP BY clause or be used in an aggregate function".
Is there a way to clear the query orderBy?
The text was updated successfully, but these errors were encountered:
No there is not :( PR for that is always welcome. As a workaround you may be able to clone() query builder before orderBy is added?
Sorry, something went wrong.
I'm running into this too and would be willing to take a stab at fixing it if I could get a little bit of help on where to start.
I'm using feathers-bookshelf-service with bookshelf.
@roemhildtg here is the PR where clearSelect and clearWhere was added #1912 it should serve as a good reference how to implement more clearXXX methods
For orderBy you can use queryInstance._clearGrouping('order') to delete all order statements
add clearOrder method fix knex#2360
add clearOrder method fix #2360 (#2553)
Successfully merging a pull request may close this issue.