[GODRIVER-468] adding _id to a *bson.Document mutates the document. Created: 18/Jun/18 Updated: 28/Oct/23 Resolved: 23/Oct/18 |
|
| Status: | Closed |
| Project: | Go Driver |
| Component/s: | CRUD |
| Affects Version/s: | 0.0.7 |
| Fix Version/s: | 0.0.18 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Sam Kleinman (Inactive) | Assignee: | Unassigned |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
While the driver should add an ID in these cases, I don't think that its correct that the driver should mutate the document you have a pointer to. |
| Comments |
| Comment by Jeffrey Yemin [ 23/Oct/18 ] | ||||
|
This has been addressed by the bson refactoring work. Now:
prints:
|