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

updateMany documentation is missleading

    • Type: Icon: Bug Bug
    • Resolution: Works as Designed
    • Priority: Icon: Major - P3 Major - P3
    • Server_Docs_20231030
    • Affects Version/s: None
    • Component/s: manual
    • Environment:

      Description

      Across different documentation updateMany differs:

      In: 

      https://github.com/mongodb/docs/blob/v4.2/source/tutorial/update-documents.txt

      https://github.com/mongodb/docs/blob/v4.2/source/reference/method/db.collection.updateMany.txt

       

      Somewherre is shown as:

       

      ```js 

      db.<collection>.updateMany({}, {$set: {a: 1);}}

      ```

      {{}}

      and somewhere as with brackets `[]`:

      {{}}

      ```js

      db.<collection>.updateMany({}, [ {$set: {a: 1 ]);}}

      {{}}

      Additionally, Mongoose documentation is missing about this command, and using the case without brackets silently changes no document.

      ```{{}}

      Scope of changes

      Impact to Other Docs

      MVP (Work and Date)

      Resources (Scope or Design Docs, Invision, etc.)

            Assignee:
            dave.cuthbert@mongodb.com Dave Cuthbert (Inactive)
            Reporter:
            mprinc@gmail.com Sasha Rudan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              3 years, 35 weeks, 1 day ago