[GODRIVER-1466] Overriding the type map entry for embedded document does not work Created: 21/Jan/20  Updated: 28/Oct/23  Resolved: 29/Jan/20

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

Type: Bug Priority: Major - P3
Reporter: Divjot Arora (Inactive) Assignee: Divjot Arora (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Case:

 Description   

If RegisterTypeMapEntry is used to decode into bson.M instead of bson.D for empty interface, the values still decode as bson.D.

Also, we should fix empty interface decoding to first check for ancestor information and then for type map entries. This will allow us to remove the warning from the RegisterTypeMapEntry documentation about registering a mapping for bsontype.EmbeddedDocument.



 Comments   
Comment by Githook User [ 29/Jan/20 ]

Author:

{'name': 'Divjot Arora', 'username': 'divjotarora', 'email': 'divjot.arora@10gen.com'}

Message: GODRIVER-1466 Respect type map entries for bsontype.EmbeddedDocument (#281)
Branch: master
https://github.com/mongodb/mongo-go-driver/commit/ed1cef61450fcdcfa79222922f434fab3a65241d

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