Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-22236

3.2 mongo shell _addSpecial( "$orderby", { qty: -1 } ) does not work

    • Type: Icon: Bug Bug
    • Resolution: Won't Fix
    • Priority: Icon: Trivial - P5 Trivial - P5
    • None
    • Affects Version/s: None
    • Component/s: Querying, Shell
    • Query
    • ALL
    • None
    • 0
    • None
    • None
    • None
    • None
    • None
    • None

      Since db.collection.find().addSpecial() is deprecated in 3.2, I don't know if this should be fixed or just noted in the 3.2 incompatibility page, but
      the following doesn't work

      db.products.find( { }, { item: 1, qty: 1, _id: 0 } )._addSpecial( "$orderby", { qty: -1 } )
      

      whereas without the $ prefix in the $orderby works

      db.products.find( { }, { item: 1, qty: 1, _id: 0 } )._addSpecial( "orderby", { qty: -1 } )
      

            Assignee:
            backlog-server-query Backlog - Query Team (Inactive)
            Reporter:
            kay.kim@mongodb.com Kay Kim (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: