BulkOperation.execute returns undefined for insertedIds

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Blocker - P1
    • 4.0.0
    • Affects Version/s: 4.0.0
    • Component/s: Shell
    • None
    • None
    • None
    • None
    • None
    • None
    • 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
              Reporter:
              Anna Herlihy (Inactive)
              None
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: