diff --git a/collection.go b/collection.go index 76053ca..a793fad 100644 --- a/collection.go +++ b/collection.go @@ -304,6 +304,7 @@ func (c *Collection) ReplaceOne(ctx context.Context, filter interface{}, doc int if len(opts) > 0 { if opts[0].ReplaceOptions != nil { replaceOpts = opts[0].ReplaceOptions + replaceOpts.SetUpsert(false) } if opts[0].UpdateHook != nil { h = opts[0].UpdateHook