diff --git a/main.go b/main.go index 1d302c2..bdde541 100644 --- a/main.go +++ b/main.go @@ -262,11 +262,9 @@ func Start(props *MongoStartProps) error { UseJSONStructTags: false, NilSliceAsEmpty: true, NilMapAsEmpty: true, + AllowTruncatingDoubles: props.AllowTruncatingDoubles, }). - SetRegistry(GetCustomRegistry()). - SetBSONOptions(&options.BSONOptions{ - AllowTruncatingDoubles: props.AllowTruncatingDoubles, - }) + SetRegistry(GetCustomRegistry()) client.DebugQuery = props.MongoDebugQuery if client.DebugQuery { @@ -354,7 +352,7 @@ func MapToBsonD(m map[string]any) (bson.D, error) { var d bson.D - err = bson.Unmarshal(data, &d) + err = bson.Unmarshal(data, &d) if err != nil { return nil, err }