Uploaded image for project: 'Compass '
  1. Compass
  2. COMPASS-5077

$unset template is incorrect

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

      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@mongodb.com Massimiliano Marcon
            Reporter:
            brian.leonard@mongodb.com Brian Leonard
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: