Example usage for com.mongodb.client.model ValidationAction WARN

List of usage examples for com.mongodb.client.model ValidationAction WARN

Introduction

In this page you can find the example usage for com.mongodb.client.model ValidationAction WARN.

Prototype

ValidationAction WARN

To view the source code for com.mongodb.client.model ValidationAction WARN.

Click Source Link

Document

Documents do not have to pass validation.

Usage

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

License:Apache License

/**
 * Create new {@link CollectionOptions} with already given settings and {@code validationAction} set to
 * {@link ValidationAction#WARN}./*  ww  w .  j  a va  2 s. co  m*/
 *
 * @return new {@link CollectionOptions}.
 * @since 2.1
 */
public CollectionOptions warnOnValidationError() {
    return schemaValidationAction(ValidationAction.WARN);
}