-
Type: Improvement
-
Resolution: Won't Fix
-
Priority: Minor - P4
-
None
-
Affects Version/s: 2.2.2
-
Component/s: Documentation
I migrated from 1.9 to 2.2 and reading the documentation I was surprised to discover that is not possible to upsert during a bulk operation anymore, since operations don't allow options.
bulkOps.Add(new UpdateOneModel<BsonDocument>(filter, update));
collection.BulkWrite(bulkOps);
Should be
options.isUpsert = true; bulkOps.Add(new UpdateOneModel<BsonDocument>(filter, update, options)); collection.BulkWrite(bulkOps);
Is this work in progress, intended, or I'm missing something? Thank you.