Uploaded image for project: 'C# Driver'
  1. C# Driver
  2. CSHARP-902

UpdateBuilder.Set should overwrite value if called twice with the same field

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Duplicate
    • Icon: Major - P3 Major - P3
    • None
    • None
    • None
    • None

    Description

      Refer StackOverflow question (http://stackoverflow.com/q/21227428/30007) for detailed description. The answer to that question also suggests a workaround in the meanwhile.
      ----------

      var update = new UpdateBuilder<SomeClass>();
      update.Set(x => x.Prop1, value1);
      update.Set(x => x.Prop2, value2);
      update.Set(x => x.Prop1, anotherValue1); // this throws a Duplicate element name error. It should overwrite the value of Prop1 with anotherValue1.

      Attachments

        Activity

          People

            Unassigned Unassigned
            amithgeorge Amith George
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: