-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: 3.0.0, 2.2.33
-
Component/s: None
-
Environment:Node 8.9.1
-
Empty show more show less
Unlike the doc stated, the following code returns FindOperatorsUnordered instead of UnorderedBulkOp
const { MongoClient } = require('mongodb'); const url = 'mongodb://localhost:27017'; const dbName = 'dbname'; MongoClient.connect(url, (err, client) => { console.log('Connected successfully to server'); const db = client.db(dbName); const batch = db.collection('Products').initializeUnorderedBulkOp(); console.log(batch.find({ code: 1 }).updateOne({ change: true })); console.log(batch); });