Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-134

Find().limit(-100) should fail if less than 100 docs returned (100 docs > 4MB)

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • None
    • 2.0
    • None
    • None

    Description

      If you set a negative limit and the number returned is less than requested an exception should be thrown.

      if (coll.find().limit(-100).getSizes()[0] != 100) //fail

      This should be an error since it is misleading and could break code that thinks it will get back that number; instead it will seem like there are less result than there actually are.

      Attachments

        Activity

          People

            eliot Eliot Horowitz (Inactive)
            scotthernandez Scott Hernandez (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: