-
Type: Bug
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: 1.4.4
-
Component/s: BSON
-
Labels:None
-
Environment:Linux
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.
- is cloned by
-
GODRIVER-1820 CLONE - BSON encoding, passing single string to $addToSet field
- Closed
- is related to
-
GODRIVER-1818 BSON encoding, passing single string to $addToSet field
- Closed