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

negative count limit brackets result to 0

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.1.1
    • Component/s: Querying
    • Labels:
      None
    • Operating System:
      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

              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: