UpdateBuilder.SetOnInsert interface is incomplete

XMLWordPrintableJSON

    • Type: New Feature
    • Resolution: Won't Fix
    • Priority: Major - P3
    • None
    • Affects Version/s: 1.8.3
    • Component/s: API
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      The current UpdateBuilder API only allows the value of the named element to be set.

      See the following code UpdateBuilder.cs#L680:

       public static UpdateBuilder SetOnInsert(string name, BsonValue value)
      

      And UpdateBuilder.cs#L1658:

              public UpdateBuilder SetOnInsert(string name, BsonValue value)
      

      For completeness, we should consider adding an overloaded method to provide a complete document. For example:

       public static UpdateBuilder SetOnInsert(BsonDocument document) { ... }
       public UpdateBuilder SetOnInsert(BsonDocument document) { ... }
      

            Assignee:
            Unassigned
            Reporter:
            James O'Leary
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: