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

updateMany documentation is missleading

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Works as Designed
    • None
    • None
    • manual

    Description

      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.)

      Attachments

        Activity

          People

            dave.cuthbert@mongodb.com Dave Cuthbert
            mprinc@gmail.com Sasha Rudan
            Jeffrey Allen Jeffrey Allen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              1 year, 43 weeks ago