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

CLONE - BSON encoding, passing single string to $addToSet field

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major - P3 Major - P3
    • None
    • 1.4.4
    • BSON
    • None
    • Linux

    Description

      update := bson.D {| | | |                                 \{"$set", f}

      ,

       
                                       {"$addToSet", bson.E{"outsideIp", "string"}},
       
      }
       
       
       
      updateResult, err := collection.UpdateOne(context.TODO(), filter, update)

       

      This fails.

       

      There is another bug posted here which was closed by a person that provides code to use a string, then when an error saying you need an array shows up he says you need to use an array.

       

      https://jira.mongodb.org/browse/GODRIVER-1818

       

      That's not how programming languages work.

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            andrewhodel@gmail.com Andrew Hodel
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: