Package com.mongodb.client.model
Class InsertOneOptions
java.lang.Object
com.mongodb.client.model.InsertOneOptions
The options to apply to an operation that inserts a single document into a collection.
- Since:
- 3.2
- MongoDB documentation
- Insert Tutorial
- Insert Command
- Since server release
- 3.2
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbypassDocumentValidation
(Boolean bypassDocumentValidation) Sets the bypass document level validation flag.Gets the bypass document level validation flagtoString()
-
Constructor Details
-
InsertOneOptions
public InsertOneOptions()
-
-
Method Details
-
getBypassDocumentValidation
Gets the bypass document level validation flag- Returns:
- the bypass document level validation flag
-
bypassDocumentValidation
Sets the bypass document level validation flag.- Parameters:
bypassDocumentValidation
- If true, allows the write to opt-out of document level validation.- Returns:
- this
-
toString
-