Example usage for com.mongodb.client.model ValidationLevel OFF

List of usage examples for com.mongodb.client.model ValidationLevel OFF

Introduction

In this page you can find the example usage for com.mongodb.client.model ValidationLevel OFF.

Prototype

ValidationLevel OFF

To view the source code for com.mongodb.client.model ValidationLevel OFF.

Click Source Link

Document

No validation for inserts or updates.

Usage

From source file:org.springframework.data.mongodb.core.CollectionOptions.java

License:Apache License

/**
 * Create new {@link CollectionOptions} with already given settings and {@code validationLevel} set to
 * {@link ValidationLevel#OFF}.//from  w w w . ja v a  2  s  .  c  o m
 *
 * @return new {@link CollectionOptions}.
 * @since 2.1
 */
public CollectionOptions disableValidation() {
    return schemaValidationLevel(ValidationLevel.OFF);
}