v0.0.283
Some checks failed
Build Docker and Deploy / Run goext test-suite (push) Failing after 1m5s
Some checks failed
Build Docker and Deploy / Run goext test-suite (push) Failing after 1m5s
This commit is contained in:
@@ -3,6 +3,8 @@ package mongoext
|
||||
import (
|
||||
"go.mongodb.org/mongo-driver/bson"
|
||||
"go.mongodb.org/mongo-driver/bson/bsoncodec"
|
||||
"go.mongodb.org/mongo-driver/bson/bsontype"
|
||||
"go.mongodb.org/mongo-driver/bson/primitive"
|
||||
"gogs.mikescher.com/BlackForestBytes/goext/rfctime"
|
||||
"reflect"
|
||||
)
|
||||
@@ -24,5 +26,9 @@ func CreateGoExtBsonRegistry() *bsoncodec.Registry {
|
||||
|
||||
bson.PrimitiveCodecs{}.RegisterPrimitiveCodecs(rb)
|
||||
|
||||
// otherwise we get []primitve.E when unmarshalling into any
|
||||
// which will result in {'key': .., 'value': ...}[] json when json-marshalling
|
||||
rb.RegisterTypeMapEntry(bsontype.EmbeddedDocument, reflect.TypeOf(primitive.M{}))
|
||||
|
||||
return rb.Build()
|
||||
}
|
||||
|
Reference in New Issue
Block a user