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

Can't handle one-to-many #12

Closed
antony opened this issue Nov 9, 2018 · 1 comment
Closed

Can't handle one-to-many #12

antony opened this issue Nov 9, 2018 · 1 comment

Comments

@antony
Copy link

antony commented Nov 9, 2018

It looks like your algorithm for hasNext doesn't work.

If you have a one-to-many (includes) relation, your result-set length is shrunk before sequelize returns the resultset to you.

What this means is that hasNext looks at the length of the resultset after it has been turned into models, which is often lower than the limit query, and declares that there are no more records.

@antony
Copy link
Author

antony commented Nov 9, 2018

Ignore this potentially, it was my use of subQuery: false which was making a mess. I suppose that can mess up pagination quite a bit!

@antony antony closed this as completed Nov 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant