-
Type: Bug
-
Resolution: Works as Designed
-
Priority: Major - P3
-
None
-
Affects Version/s: 1.1.4
-
Component/s: CRUD
-
None
-
Environment:Linux 4.9.0-11-amd64
If I setup an opts variable, like this:
```
opts := options.Update().SetUpsert(true)
```
Then I run collection.updateOne using that opts variable, then try to run another collection.UpdateOne using that opts variable it gives an error which does not describe that the problem is that the upsert option is not set to true and there is no existing document that matches the filter,.
If I just reset the opts variable after each collection.updateOne, like this:
```
opts := options.Update().SetUpsert(true)
```
Then it works as intended. The error is ambiguous and I do not understand the reason that it would reset the options each time when the options are stored in a variable.