[GODRIVER-1820] CLONE - BSON encoding, passing single string to $addToSet field Created: 04/Jan/21  Updated: 06/Jan/21  Resolved: 06/Jan/21

Status: Closed
Project: Go Driver
Component/s: BSON
Affects Version/s: 1.4.4
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Andrew Hodel Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Linux


Issue Links:
Cloners
clones GODRIVER-1819 BSON encoding, passing single string ... Closed
Duplicate
duplicates GODRIVER-1818 BSON encoding, passing single string ... Closed

 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.

 



 Comments   
Comment by Andrew Hodel [ 04/Jan/21 ]

Strange, you cannot even close issues.

 

Also close and clone, how funny.  So do more work and close it.

Generated at Thu Feb 08 08:37:12 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.