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

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 1.7.1
    • Fix Version/s: 2.0
    • Component/s: None
    • Labels:
      None
    • Environment:
      MongoDB C# Driver.

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved: