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

FindOne with Sort

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Minor - P4
    • Resolution: Fixed
    • None
    • 2.9.0
    • API
    • None

    Description

      In order to do sort on a findOne you have to:

      find(query).limit(1).sort(sortBy).next()

      It would be more convenient to have sort support within the findOne method, for example:

      findOne(query,fields,sort)

      I am using Java but this is likely to apply to many other drivers.

      Attachments

        Activity

          People

            steve.briskin Steve Briskin
            charris Chris Harris
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: