Uploaded image for project: 'Ruby Driver'
  1. Ruby Driver
  2. RUBY-1093

Since 2.2.0 giving negative limit does not work

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.2.4
    • Affects Version/s: 2.2.0
    • Component/s: None
    • Labels:
      None

      Since 2.2.0 giving negative limit does not work.
      Negative limit is valid MongoDB value (https://docs.mongodb.org/manual/reference/method/cursor.limit/#negative-values)
      and worked as expected.

      It's broken since https://jira.mongodb.org/browse/RUBY-1033
      without explanation or error.

      Commit:
      https://github.com/mongodb/mongo-ruby-driver/commit/f1503de20ec35dd025240aa5a2a582df3af3836d#diff-0b2050a2a348c2d3c671360acd89874bR99

      Setting "singleBatch" does not work the same.

      -1 was useful because <5.x versions of mongoid were adding sort while using #first or #last, but IMHO it still should work as before.

            Assignee:
            emily.stolfo Emily Stolfo
            Reporter:
            kamil.lemanski@nokaut.pl Kamil Lema?ski
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: