Package org.hibernate.annotations
Annotation Type SQLDelete
-
@Target({TYPE,FIELD,METHOD}) @Retention(RUNTIME) @Repeatable(SQLDeletes.class) public @interface SQLDelete
Specifies a custom SQL DML statement to be used in place of the default SQL generated by Hibernate when an entity or collection row is deleted from the database.The given
SQL statementmust have exactly the number of JDBC?parameters that Hibernate expects, in the exact order Hibernate expects. The primary key columns come before the version column if the entity is versioned.
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description booleancallableIs the statement callable (aka aCallableStatement)?ResultCheckStylecheckFor persistence operation what style of determining results (success/failure) is to be used.StringtableThe name of the table in the case of an entity withsecondary tables, defaults to the primary table.
-
-
-
Element Detail
-
sql
String sql
Procedure name or SQL DELETE statement.
-
-
-
callable
boolean callable
Is the statement callable (aka aCallableStatement)?- Default:
- false
-
-
-
check
ResultCheckStyle check
For persistence operation what style of determining results (success/failure) is to be used.- Default:
- org.hibernate.annotations.ResultCheckStyle.NONE
-
-
-
table
String table
The name of the table in the case of an entity withsecondary tables, defaults to the primary table.- Returns:
- the name of the table
- Since:
- 6.2
- Default:
- ""
-
-