File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
source/includes/usage-examples/code-snippets Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -48,9 +48,9 @@ func main() {
48
48
// Creates write models that specify replace and update operations
49
49
models := []mongo.WriteModel {
50
50
mongo .NewReplaceOneModel ().SetFilter (bson.D {{"name" , "Towne Cafe" }}).
51
- SetReplacement (Restaurant {Name : "New Towne Cafe" }),
52
- mongo .NewUpdateOneModel ().SetFilter (bson.D {{"name" , "New Towne Cafe " }}).
53
- SetUpdate (bson.D {{"$set" , bson.D {{"cuisine " , "French " }}}}),
51
+ SetReplacement (Restaurant {Name : "New Towne Cafe" , Cuisine : "French" }),
52
+ mongo .NewUpdateOneModel ().SetFilter (bson.D {{"name" , "Riviera Caterer " }}).
53
+ SetUpdate (bson.D {{"$set" , bson.D {{"name " , "Riviera Cafe " }}}}),
54
54
}
55
55
56
56
// Specifies that the bulk write is ordered
You can’t perform that action at this time.
0 commit comments