Uploaded image for project: 'Go Driver'
  1. Go Driver
  2. GODRIVER-2323

updateone function issue

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 1.9.1
    • Affects Version/s: 1.7.5, 1.8.1, 1.8.2, 1.8.3
    • Component/s: None
    • Labels:
      None

      Summary

      when using the updateone function it results in 

      response field ‘n’ is type int32, but received BSON type 64-bit integer

      This error does not appear before version 1.7.5 of the driver 

       

      Please provide the version of the driver. If applicable, please provide the MongoDB server version and topology (standalone, replica set, or sharded cluster).

      Any version from 1.7.5 onwards

      How to Reproduce

      running any simple example of updateone leads to the issue 

      the following code is taken from the mongo DB example in the documentation

      opts := options.Update().SetUpsert(true) opts := options.Update().SetUpsert(true) filter := bson.D{{"_id", id}} update := bson.D{{"$set", bson.D{{"email", "newemail@example.com"}}}}
      result, err := coll.UpdateOne(context.TODO(), filter, update, opts) if err != nil { log.Fatal(err) }

       

            Assignee:
            matt.dale@mongodb.com Matt Dale
            Reporter:
            sachinhydratech@gmail.com Sachin Sanjay
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: