[GODRIVER-324] Handle objectid.ObjectID in the bson.Encoder Created: 03/Apr/18  Updated: 05/Apr/18  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: Improvement Priority: Major - P3
Reporter: Kristofer Brandow (Inactive) Assignee: Kristofer Brandow (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Problem/Incident
causes GODRIVER-323 Struct with bson tag _id inserts a by... Closed
Epic Link: GODRIVER Alpha UX

 Description   

The encoder currently doesn't handle objectIDs properly. Ensure that when an objectID is encountered it is properly marshaled as a BSON ObjectId and not as a BSON Binary type.



 Comments   
Comment by Githook User [ 05/Apr/18 ]

Author:

{'email': 'kris@mongodb.com', 'name': 'Kris Brandow', 'username': 'skriptble'}

Message: Add support for encoding ObjectIDs

Added support for struct fields, map keys, map values, and slice values
that are ObjectIDs.

GODRIVER-324
GODRIVER-323

Change-Id: I070fef2199022ca47dcee3546054e3f6be077ff2
Branch: master
https://github.com/mongodb/mongo-go-driver/commit/8a0b12411980d40543cfb8643272bc60151e0204

Comment by Kristofer Brandow (Inactive) [ 03/Apr/18 ]

Code Review: https://review.gerrithub.io/c/406238/.

Generated at Thu Feb 08 08:33:58 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.