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

allow $addFields with empty document and have it be a no-op

    XMLWordPrintable

    Details

    • Backwards Compatibility:
      Fully Compatible
    • Backport Requested:
      v4.4, v4.2, v4.0
    • Sprint:
      Query 2020-10-19, Query 2020-11-02, Query 2020-11-16

      Description

      For programatic populating of $addFields (in update pipeline for instance) it would help if (becoming consistent with SERVER-38909) we would allow empty document rather than error "Invalid $addFields :: caused by :: specification must have at least one field"

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              betty.shen Betty Shen
              Reporter:
              asya Asya Kamsky
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: