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

negative count limit brackets result to 0

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 2.1.1
    • Querying
    • None
    • ALL

    Description

      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

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: