If a negative limit is provided to find, results are capped to the negation of that limit. If a negative limit is provided to count, 0 is returned.
> c.save( {} )
> c.save( {} )
> c.save( {} )
> c.find().limit( -2 ).count( true )
0
> c.find().limit( -2 ).itcount()
2
- is related to
-
SERVER-5151 sharded count can return a negative value if a negative limit is supplied
- Closed