Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-5355

negative count limit brackets result to 0

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.1.1
    • Affects Version/s: None
    • Component/s: Querying
    • Labels:
      None
    • ALL

      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
      

            Assignee:
            randolph@mongodb.com Randolph Tan
            Reporter:
            aaron Aaron Staple
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: