on delete clause
of a foreign key constraint. Specifies what action the database
should take when deletion of a row would result in a violation of
the constraint.
OnDelete
| Modifier and Type | Field and Description |
|---|---|
| public static final OnDeleteAction | CASCADE
Cascade deletion of the parent to the child. |
| public static final OnDeleteAction | NO_ACTION
No action. |
| public static final OnDeleteAction | RESTRICT
Prevents deletion of the parent by raising an error immediately. |
| public static final OnDeleteAction | SET_DEFAULT
Set the referencing foreign key to its default value. |
| public static final OnDeleteAction | SET_NULL
Set the referencing foreign key to null. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static OnDeleteAction | |
| public String | |
| public String | |
| public static OnDeleteAction | |
| public static OnDeleteAction[] |
| CASCADE | back to summary |
|---|---|
| public static final OnDeleteAction CASCADE Cascade deletion of the parent to the child. | |
| NO_ACTION | back to summary |
|---|---|
| public static final OnDeleteAction NO_ACTION No action. The default. An error is raised if rows still reference the parent when the constraint is checked, possibly later in the transaction. | |
| RESTRICT | back to summary |
|---|---|
| public static final OnDeleteAction RESTRICT Prevents deletion of the parent by raising an error immediately.
| |
| SET_DEFAULT | back to summary |
|---|---|
| public static final OnDeleteAction SET_DEFAULT Set the referencing foreign key to its default value.
| |
| SET_NULL | back to summary |
|---|---|
| public static final OnDeleteAction SET_NULL Set the referencing foreign key to null.
| |
| OnDeleteAction | back to summary |
|---|---|
| private OnDeleteAction() | |
| fromExternalForm | back to summary |
|---|---|
| public static OnDeleteAction fromExternalForm(Object value) | |
| getAlternativeName | back to summary |
|---|---|
| public String getAlternativeName() | |
| toSqlString | back to summary |
|---|---|
| public String toSqlString() | |
| valueOf | back to summary |
|---|---|
| public static OnDeleteAction valueOf(String name) | |
| values | back to summary |
|---|---|
| public static OnDeleteAction[] values() | |