Decoding a nil into *time.Time returns an error, *time.Time is a pointer so it should be possible to decode nul from the database into a nil but this returns an error.
Same thing happens with ObjectID and possible other default_value_decoders.
In ObjectID though there is another issue too, not only it is not possible to decode into nil, but it does not even accept a pointer to ObjectID, the check/type assertion .(**bson.ObjectId) is totally missing form the code, while is present in TimeDecodeValue
The affected file seems bson/bsoncodec/default_value_decoders.go
- duplicates
-
GODRIVER-535 Add support for pointers to reflect.Kind types
- Closed