Packages

o

org.mongodb.scala.model

ValidationAction

object ValidationAction

Determines how strictly MongoDB applies the validation rules to existing documents during an insert or update.

Since

1.1

Note

Requires MongoDB 3.2 or greater

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ValidationAction
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Value Members

  1. val ERROR: ValidationAction

    Documents must pass validation before the write occurs.

    Documents must pass validation before the write occurs. Otherwise, the write operation fails.

  2. val WARN: ValidationAction

    Documents do not have to pass validation.

    Documents do not have to pass validation. If the document fails validation, the write operation logs the validation failure to the mongod logs.

  3. def fromString(validationAction: String): Try[ValidationAction]

    Returns the validationAction from the string representation of a validation action.

    Returns the validationAction from the string representation of a validation action.

    validationAction

    the string representation of the validation action.

    returns

    the validation action