Package org.hibernate.annotations
Annotation Type OnDelete
-
@Target({METHOD,FIELD,TYPE}) @Retention(RUNTIME) public @interface OnDelete
Specifies anon deleteaction for a foreign key constraint. The most common usage is@OnDelete(action = CASCADE). Note that this results in anon delete cascadeclause in the DDL definition of the foreign key. It's completely different toCascadeType.REMOVE.Like database triggers,
on deleteactions can cause state held in memory to lose synchronization with the database.
-
-
Required Element Summary
Required Elements Modifier and Type Required Element Description OnDeleteActionactionThe action to taken by the database when deletion of a row would cause the constraint to be violated.
-
-
-
Element Detail
-
action
OnDeleteAction action
The action to taken by the database when deletion of a row would cause the constraint to be violated.
-
-