FindOne with Sort

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Done
    • Priority: Minor - P4
    • 2.9.0
    • Affects Version/s: None
    • Component/s: API
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • 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 (Inactive)
              Reporter:
              Chris Harris (Inactive)
              None
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: