moped icon indicating copy to clipboard operation
moped copied to clipboard

batch_size 1 prevents iteration over query results

Open leemhenson opened this issue 10 years ago • 0 comments

If you set batch_size to 1, you cannot use each to iterate over a collection. It looks like a cursor_id is never assigned, so while more? is false in Cursor#each. Is this a moped or a mongodb issue? I realise it's a bit of an odd thing to do, but I'm adding Mongoid support to a gem whose test suite is setting batch_size to 1 for a particular test case.

See pull request for failing spec: https://github.com/mongoid/moped/pull/326

leemhenson avatar Oct 21 '14 13:10 leemhenson