Empty UpdateBuilder<T> will null out a document

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Won't Fix
    • Priority: Major - P3
    • None
    • Affects Version/s: 1.9.1
    • Component/s: None
    • None
    • Environment:
      Windows 8.1
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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.
      }
      

            Assignee:
            Unassigned
            Reporter:
            zhyk
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: