$unset template is incorrect

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Duplicate
    • Priority: Minor - P4
    • 1.31.0
    • Affects Version/s: None
    • Component/s: Aggregation pipeline
    • None
    • 2
    • Not Needed
    • None

      When adding an $unset stage, you are provided with the following template:

      /**
       * fields: The field name(s).
       */
      {
        field
      }

      However, $unset expects an array of strings, not an object. So it should be:

      /**
       * fields: The field name(s).
       */
      [
        "field1", "field2"
      ]

            Assignee:
            Massimiliano Marcon
            Reporter:
            Brian Leonard
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: