Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-16163

[SERVER] [Feedback] misleading usage of alias

      Quote from this doc page

      > The $replaceWith  is an alias for $replaceRoot.

      This is actually not true, since the syntax for $replaceRoot is:

      { $replaceRoot: { newRoot: <replacementDocument> } }

      whereas the syntax for $replaceWith is :

      { $replaceWith: <replacementDocument> }

      I understand why it is named "alias", just I had already some developers taking this literally and failing since they did not add the newRoot part... I like to suggest to point out that this is an alias in terms of the functionality but not in terms of syntax.

            Assignee:
            dave.cuthbert@mongodb.com Dave Cuthbert (Inactive)
            Reporter:
            michael.hoeller@akazia.de Michael Höller
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              38 weeks, 6 days ago