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

Fix pagination count with eager cursors #155

Merged
merged 1 commit into from Jan 31, 2016

Conversation

alcaeus
Copy link
Member

@alcaeus alcaeus commented Jan 30, 2016

Supersedes #152.

This prevents issues such as doctrine/mongodb-odm#1283: using references primers implies eager cursors, which in turn don't support returning all found elements in count without being restricted by the limit set on the cursor. Furthermore, running count() on an eager cursor without a limit set would load all found items to memory to avoid future queries. This PR adds a workaround for the paginator to query the base cursor and avoid this data cache.

@gianarb
Copy link
Contributor

gianarb commented Jan 31, 2016

Thanks a lot!

@gianarb gianarb added the Enhancement New feature or request label Jan 31, 2016
gianarb pushed a commit that referenced this pull request Jan 31, 2016
Fix pagination count with eager cursors
@gianarb gianarb merged commit 7034a25 into doctrine:master Jan 31, 2016
@alcaeus alcaeus deleted the fix-eager-cursor-pagination branch May 13, 2017 18:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants