JPA Annotation

CheckConstraint

Implemented Interfaces:
Annotation

Used to specify a SQL check constraint on a column or table when schema generation is in effect.
See Also:
Table.check
Column.check
Since:
JPA 3.2

Public Annotation Attributes

String constraint default null
(Required) The native SQL expression to be checked.
Since:
JPA 3.2
String name default ""
(Optional) The name of the constraint.

Defaults to a provider-generated name.

Since:
JPA 3.2
String options default ""
(Optional) A SQL fragment appended to the generated DDL which creates this constraint.
Since:
JPA 3.2