db.aggregate() fails without square brackets

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Shell
    • Query Execution
    • ALL
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      In the Mongo shell, a command such as

      db.aggregate({ $currentOp: {} })
      

      fails unless it's written with square brackets:

      db.aggregate([{ $currentOp: {} }])
      

      This is inconsistent with the behavior of aggregate on a collection.

            Assignee:
            [DO NOT USE] Backlog - Query Execution
            Reporter:
            David Golub (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: