@@ -638,6 +638,9 @@ OperationResult executeFindOneAndUpdate(final BsonDocument operation) {
638
638
case "arrayFilters" :
639
639
options .arrayFilters (cur .getValue ().asArray ().stream ().map (BsonValue ::asDocument ).collect (toList ()));
640
640
break ;
641
+ case "bypassDocumentValidation" :
642
+ options .bypassDocumentValidation (cur .getValue ().asBoolean ().getValue ());
643
+ break ;
641
644
default :
642
645
throw new UnsupportedOperationException ("Unsupported argument: " + cur .getKey ());
643
646
}
@@ -714,6 +717,9 @@ OperationResult executeFindOneAndReplace(final BsonDocument operation) {
714
717
case "collation" :
715
718
options .collation (asCollation (cur .getValue ().asDocument ()));
716
719
break ;
720
+ case "bypassDocumentValidation" :
721
+ options .bypassDocumentValidation (cur .getValue ().asBoolean ().getValue ());
722
+ break ;
717
723
default :
718
724
throw new UnsupportedOperationException ("Unsupported argument: " + cur .getKey ());
719
725
}
@@ -831,6 +837,9 @@ OperationResult executeAggregate(final BsonDocument operation) {
831
837
case "maxAwaitTimeMS" :
832
838
iterable .maxAwaitTime (cur .getValue ().asNumber ().longValue (), TimeUnit .MILLISECONDS );
833
839
break ;
840
+ case "bypassDocumentValidation" :
841
+ iterable .bypassDocumentValidation (cur .getValue ().asBoolean ().getValue ());
842
+ break ;
834
843
default :
835
844
throw new UnsupportedOperationException ("Unsupported argument: " + cur .getKey ());
836
845
}
@@ -981,6 +990,9 @@ OperationResult executeInsertOne(final BsonDocument operation) {
981
990
case "comment" :
982
991
options .comment (cur .getValue ());
983
992
break ;
993
+ case "bypassDocumentValidation" :
994
+ options .bypassDocumentValidation (cur .getValue ().asBoolean ().getValue ());
995
+ break ;
984
996
default :
985
997
throw new UnsupportedOperationException ("Unsupported argument: " + cur .getKey ());
986
998
}
@@ -1018,6 +1030,9 @@ OperationResult executeInsertMany(final BsonDocument operation) {
1018
1030
case "comment" :
1019
1031
options .comment (cur .getValue ());
1020
1032
break ;
1033
+ case "bypassDocumentValidation" :
1034
+ options .bypassDocumentValidation (cur .getValue ().asBoolean ().getValue ());
1035
+ break ;
1021
1036
default :
1022
1037
throw new UnsupportedOperationException ("Unsupported argument: " + cur .getKey ());
1023
1038
}
@@ -1062,6 +1077,9 @@ OperationResult executeBulkWrite(final BsonDocument operation) {
1062
1077
case "let" :
1063
1078
options .let (cur .getValue ().asDocument ());
1064
1079
break ;
1080
+ case "bypassDocumentValidation" :
1081
+ options .bypassDocumentValidation (cur .getValue ().asBoolean ().getValue ());
1082
+ break ;
1065
1083
default :
1066
1084
throw new UnsupportedOperationException ("Unsupported argument: " + cur .getKey ());
1067
1085
}
@@ -1192,6 +1210,9 @@ private UpdateOptions getUpdateOptions(final BsonDocument arguments) {
1192
1210
case "sort" :
1193
1211
options .sort (cur .getValue ().asDocument ());
1194
1212
break ;
1213
+ case "bypassDocumentValidation" :
1214
+ options .bypassDocumentValidation (cur .getValue ().asBoolean ().getValue ());
1215
+ break ;
1195
1216
default :
1196
1217
throw new UnsupportedOperationException ("Unsupported argument: " + cur .getKey ());
1197
1218
}
@@ -1229,6 +1250,9 @@ private ReplaceOptions getReplaceOptions(final BsonDocument arguments) {
1229
1250
case "sort" :
1230
1251
options .sort (cur .getValue ().asDocument ());
1231
1252
break ;
1253
+ case "bypassDocumentValidation" :
1254
+ options .bypassDocumentValidation (cur .getValue ().asBoolean ().getValue ());
1255
+ break ;
1232
1256
default :
1233
1257
throw new UnsupportedOperationException ("Unsupported argument: " + cur .getKey ());
1234
1258
}
0 commit comments