[GODRIVER-533] ObjectId is not read to string by Decode when asked Created: 29/Aug/18  Updated: 10/Sep/18  Resolved: 10/Sep/18

Status: Closed
Project: Go Driver
Component/s: None
Affects Version/s: 0.0.12
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Adrien Candiotti Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to GODRIVER-549 Add ObjectID struct tag for strings Backlog

 Description   

Using a struct with a string as the ObjectId field, the ObjectId is not decoded.

This is useful in a case where you create a database abstraction and dont want to keep an ObjectId in your objects but rather a generic type like a string.
If you ever want to switch to another database, you would just have to change the model layer, not the entire code.



 Comments   
Comment by Kristofer Brandow (Inactive) [ 10/Sep/18 ]

This change is superseded by GODRIVER-549.

Comment by Adrien Candiotti [ 29/Aug/18 ]

I fixed this in the following pull request:

 

https://github.com/mongodb/mongo-go-driver/pull/86

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