Uploaded image for project: 'Node.js Driver'
  1. Node.js Driver
  2. NODE-2923

BulkOperation.execute returns undefined for insertedIds

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Blocker - P1 Blocker - P1
    • 4.0.0
    • Affects Version/s: 4.0.0
    • Component/s: Shell
    • None

      Steps to recreate:

       

      > const bulk = c.db('test').collection('coll').initializeUnorderedBulkOp()
      > for (let i = 0; i < 1000; i++) bulk.insert({x: 1}
      > const result = await bulk.execute()
      > result.insertedIds
      -----> RETURNS { 0: undefined, ... 999: undefined }

      result.result.insertedIds has ids that are not undefined.

       

       

            Assignee:
            matt.broadstone@mongodb.com Matt Broadstone
            Reporter:
            anna.herlihy@mongodb.com Anna Herlihy (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: