Skip to content

Commit ae461fa

Browse files
committed
CSHARP-1437: FindAndModify should use WriteConcern from the collection's settings.
1 parent fb69310 commit ae461fa

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/MongoDB.Driver.Legacy/MongoCollection.cs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,8 @@ public virtual FindAndModifyResult FindAndModify(FindAndModifyArgs args)
571571
MaxTime = args.MaxTime,
572572
Projection = projection,
573573
ReturnDocument = returnDocument,
574-
Sort = sort
574+
Sort = sort,
575+
WriteConcern = _settings.WriteConcern
575576
};
576577
}
577578
else
@@ -583,7 +584,8 @@ public virtual FindAndModifyResult FindAndModify(FindAndModifyArgs args)
583584
MaxTime = args.MaxTime,
584585
Projection = projection,
585586
ReturnDocument = returnDocument,
586-
Sort = sort
587+
Sort = sort,
588+
WriteConcern = _settings.WriteConcern
587589
};
588590
}
589591

@@ -640,8 +642,8 @@ public virtual FindAndModifyResult FindAndRemove(FindAndRemoveArgs args)
640642
{
641643
MaxTime = args.MaxTime,
642644
Projection = projection,
643-
Sort = sort
644-
645+
Sort = sort,
646+
WriteConcern = _settings.WriteConcern
645647
};
646648

647649
try

0 commit comments

Comments
 (0)