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

FindOne with Sort

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 2.9.0
    • Affects Version/s: None
    • Component/s: API
    • None

      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.

            Assignee:
            steve.briskin Steve Briskin (Inactive)
            Reporter:
            charris Chris Harris
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: