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

Combing Inc, silent fail

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Major - P3 Major - P3
    • None
    • 2.0.1
    • API
    • None
    • CSharp, mono and .net

    Description

      Applying:
      Builders<T>.Update.Inc( "id",1).Inc("id",-1)
      To:

      {id:0}

      Result:

      {id:-1}

      Combining Inc doesn't seem to work, it will overwrite the last inc on the same field, this is made more troublesome by the inability to update a collection with a BsonDocument as the update so you can't get round this.

      There seems to be no error and no way of querying the UpdateDefinition to see if an existing Inc for the field exists.

      Attachments

        Activity

          People

            Unassigned Unassigned
            dwayne@dwaynebull.co.uk Dwayne Bull
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: