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

$unset template is incorrect

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Minor - P4 Minor - P4
    • 1.31.0
    • None
    • Aggregation pipeline
    • None
    • 2
    • Not Needed

    Description

      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"
      ]

      Attachments

        Activity

          People

            massimiliano.marcon@mongodb.com Massimiliano Marcon
            brian.leonard@mongodb.com Brian Leonard
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: