options.FindOptions.SetLimit() docs suggest negative limits are still supported, but they're not

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Minor - P4
    • 1.0.2
    • Affects Version/s: 1.0.0-rc2
    • Component/s: CRUD
    • None
    • None
    • Fully Compatible
    • None
    • None
    • None
    • None
    • None
    • None

      The docs for options.FindOptions.SetLimit() suggest that negative limits are valid, when in fact the server returns an error if you try ("Error: (BadValue) Limit value must be non-negative, but received: <N>"). This is because the driver uses the newer find command, which doesn't support negative limits.

      (mgo supported negative limits, presumably by converting it to a positive limit + singleBatch=true, which adds to the confusion - as does the fact that the shell's cursor.limit() supports negative limits too!)

            Assignee:
            Divjot Arora (Inactive)
            Reporter:
            Duncan Armstrong
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: