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

Return insertedIds from insertMany() even if there are failures

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Icon: Minor - P4 Minor - P4
    • None
    • None
    • Shell
    • None
    • Server Tooling & Methods

    Description

      It would be more aesthetically pleasing if insertMany returned all inserted IDs.

      db.test.insertMany([{}, {}]) returns 2 values in insertedIds, while db.test.insertMany([{_id: 1}, {_id: 1}]) does not return 1 value in insertedIds, even though there is one successful insert.

      Attachments

        Activity

          People

            backlog-server-stm Backlog - Server Tooling and Methods (STM) (Inactive)
            monrealis@gmail.com Vytenis -
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: