Package dev.morphia.annotations
Annotation Interface Validation
Defines the document validation logic for a collection.
- Since:
- 1.3
-
Required Element Summary
Required Elements -
Optional Element Summary
Optional Elements
-
Element Details
-
value
String value- Returns:
- the query used to validate documents in a collection. This query is not validated so care must be taken to ensure document field names and types are correct.
- MongoDB documentation
- core/document-validation/
-
-
-
level
ValidationLevel level- Returns:
- how strictly MongoDB should apply the validation rules to existing documents during an insert or update.
- See Also:
- Default:
- STRICT
-
action
ValidationAction action- Returns:
- how strictly MongoDB should apply the validation rules to existing documents during an insert or update.
- See Also:
- Default:
- ERROR
-