Skip to content

Conversation

@wojcikstefan
Copy link
Member

@wojcikstefan wojcikstefan commented Dec 5, 2016

Without these fixes, iterating over a queryset within another iteration would cause the "outer" iteration to only return 100 results.

This PR also fixes #1086 where calling len(qs) mid-iteration would cause the same problem.

Thanks to @eli-b and @gordol for inspiration!

@wojcikstefan
Copy link
Member Author

@touilleMan are you still involved with this project? If so, would you mind reviewing this? I noticed that you gave a thoughtful description of the problem in #1086 (comment).

@touilleMan
Copy link
Member

@wojcikstefan I'm not very active on the project right now (working on my own mongo odm 😛 ) but I always love to give a hand !

The PR pretty elegant to me, it's all good 👍

@wojcikstefan wojcikstefan merged commit 4d0c092 into master Dec 5, 2016
@wojcikstefan
Copy link
Member Author

Thanks @touilleMan! I want to check out umongo for my next project, but for now I'll just try to make MongoEngine faster and less buggy :)

@gordol
Copy link

gordol commented Dec 7, 2016

Nice, happy to see this fixed finally!

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

Successfully merging this pull request may close these issues.

Calling len() on a QuerySet object mid-iteration stops iteration at current hundred documents

4 participants