[GODRIVER-732] ReplaceOne result does not set UpsertedID and possibly MatchedCount is wrong Created: 20/Dec/18 Updated: 27/Oct/23 Resolved: 14/Jan/19 |
|
| Status: | Closed |
| Project: | Go Driver |
| Component/s: | CRUD |
| Affects Version/s: | No Release |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Asaf Shakarzy | Assignee: | Unassigned |
| Resolution: | Works as Designed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
ReplaceOne perform as expected but UpdateResult is wrong:
Consider this sampel code:
Thanks. |
| Comments |
| Comment by Kristofer Brandow (Inactive) [ 14/Jan/19 ] |
|
Hi asaf000, You need to add the Upsert option to enable ReplaceOne to upsert. --Kris |