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

UpdateBuilder.Set throws InvalidOperationException when Set twice with the same element.

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.0
    • Affects Version/s: 1.7.1
    • Component/s: None
    • None
    • Environment:
      MongoDB C# Driver.

      UpdateBuilder.Set throws InvalidOperationException when Set twice with the same element.

      Eg:

      UpdateQuerySet.Set("Email", value1);
      UpdateQuerySet.Set("Email", value2);

      Ideally, it should have overwritten the first value. Or even, as a worst case, it should just add the second value along, since update({},

      {"email": "value1", "email" : "value2"}

      works on perfectly as a command when given directly using the MongoDB shell.

            Assignee:
            Unassigned Unassigned
            Reporter:
            prasannavl Prasanna V. Loganathar
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: