-
Type: Bug
-
Resolution: Won't Fix
-
Priority: Major - P3
-
None
-
Affects Version/s: 1.9.1
-
Component/s: None
-
Labels:None
-
Environment:Windows 8.1
See also: [Empty UpdateBuilder will null out a document:https://jira.mongodb.org/browse/CSHARP-282]
MongoCollection<T>.Update() should also throw an exception for an empty QueryBuilder<T>.
void EmptyUpdate(MongoCollection<T> c) { c.Update(Query.Null, new UpdateBuilder<T>()); // This will empty the document silently. c.Update(Query.Null, new UpdateBuilder()); // This will throw an exception. }