[GODRIVER-339] Document Set does not always replace the correct field. Created: 04/Apr/18 Updated: 28/Oct/23 Resolved: 05/Apr/18 |
|
| Status: | Closed |
| Project: | Go Driver |
| Component/s: | None |
| Affects Version/s: | 0.0.2 |
| Fix Version/s: | 0.0.3 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Thomas Delacour (Inactive) | Assignee: | Kristofer Brandow (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Description |
|
It's possible to use the Document.Set function and get a resulting document with the wrong field replaced. After discussion with kris.brandow it seems like the problem is this line: https://github.com/mongodb/mongo-go-driver/blob/master/bson/document.go#L259 which should be replaced with d.elems[d.index[i]] = elem |
| Comments |
| Comment by Githook User [ 05/Apr/18 ] |
|
Author: {'email': 'kris@mongodb.com', 'name': 'Kris Brandow', 'username': 'skriptble'}Message: Fix bug with bson.Document.Set Fixes a bug with bson.Document.Set where documents that are not in Change-Id: I37f1415ba10196121229b117f44b1eeb97e0a200 |
| Comment by Kristofer Brandow (Inactive) [ 04/Apr/18 ] |
|
Code Review: https://review.gerrithub.io/c/406467/. |