Annotation Type SQLDelete

  • @Target({TYPE,FIELD,METHOD})
    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 statement must 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.

    If an entity has secondary tables, it may have a @SQLDelete annotation for each secondary table. The table() member must specify the name of the secondary table.