Details
-
Bug
-
Resolution: Won't Fix
-
Major - P3
-
None
-
1.9.1
-
None
-
None
-
Windows 8.1
Description
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.
|
}
|