Skip to content
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

count_for_pager is broken for id fields that aren't integers #77

Open
campbellr opened this issue Jun 22, 2015 · 1 comment
Open

count_for_pager is broken for id fields that aren't integers #77

campbellr opened this issue Jun 22, 2015 · 1 comment

Comments

@campbellr
Copy link

Table.has_id is used to determine whether or not to use MAX(id) vs COUNT(*) in count_for_pager, but this only works if the id field is an integer.

In my schema i have an id that is a text type representing a UUID, which makes count_for_pager always return 0.

I think it might be safer to only use MAX(id) if has_id is true and the id field is some sort of integer type

@paazmaya
Copy link
Contributor

Would you like to make a pull request?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants