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

insertOne inconsistency

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: 2.0.5
    • Component/s: None
    • Labels:
    • Environment:
      OSX, but probably all platforms

      Not very important... I checked on 2.0.4 only...

      InsertOne returns an array of one item in ops (the document inserted), and a single value for InsertedId (singular)
      InsertMany returns an array of inserted document in ['ops'], and an array of inserted _id in insertedIds (plural)

      would it be more consistent to return always an array for id inserted, in the One case, and on the Many case, like for the document inserted ?

      Nicolas

            Assignee:
            christkv Christian Amor Kvalheim
            Reporter:
            Nico nicoZeDodo [X]
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: