Please document the methods of the bulk objects

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 3.3.3
    • Affects Version/s: 3.1.10
    • Component/s: Docs
    • None
    • None
    • None
    • None
    • None
    • None

      After reading the documentation at http://mongodb.github.io/node-mongodb-native/3.1/api/Collection.html#initializeOrderedBulkOp, I wanted to call some updateOne methods on the bulk object returned by initializeUnorderedBulkOp:

      const bulk = collection.initializeUnorderedBulkOp();
      {{bulk.updateOne({ _id: foo }, { $set:

      { bar: "baz" }

      });}}

      However, this resulted in TypeError: bulk.updateOne is not a function.

      I found out from StackOverflow that I need to prefix each operation with "find" (why?).

      The documentation should mention all available methods on the bulk operation types, not just execute:

      http://mongodb.github.io/node-mongodb-native/3.1/api/OrderedBulkOperation.html

      http://mongodb.github.io/node-mongodb-native/3.1/api/UnorderedBulkOperation.html

              Assignee:
              Daniel Aprahamian (Inactive)
              Reporter:
              Dan Dascalescu
              None
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: