Skip to content

Commit

Permalink
GODRIVER-2937 Copy BSONOptions when merging coll or db opts (#1483)
Browse files Browse the repository at this point in the history
  • Loading branch information
prestonvasquez authored and matthewdale committed Dec 5, 2023
1 parent 09f6511 commit fdde176
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions mongo/options/collectionoptions.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,9 @@ func MergeCollectionOptions(opts ...*CollectionOptions) *CollectionOptions {
if opt.Registry != nil {
c.Registry = opt.Registry
}
if opt.BSONOptions != nil {
c.BSONOptions = opt.BSONOptions
}
}

return c
Expand Down
3 changes: 3 additions & 0 deletions mongo/options/dboptions.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,9 @@ func MergeDatabaseOptions(opts ...*DatabaseOptions) *DatabaseOptions {
if opt.Registry != nil {
d.Registry = opt.Registry
}
if opt.BSONOptions != nil {
d.BSONOptions = opt.BSONOptions
}
}

return d
Expand Down

0 comments on commit fdde176

Please sign in to comment.