-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Inconsistent results when paginating #1040
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Ran into a very puzzling issue when using
.page
Plucking specific columns (eg,
SELECT "organisations"."id" FROM "organisations"
) using pagination leads to a different set of data than loading the whole record (eg,SELECT "organisations".* FROM "organisations"
).This is very bad as demonstrated by the use case
As a developer you would expect the results of those to be consistent, but they lead to completely different data as shown in the screenshot.
Enforcing a
.order(:id)
fixes the issue, but since your gem shows many use cases without usingorder
it should be assumed that you dont have to useorder
to get consistent results.The text was updated successfully, but these errors were encountered: