Annotation Interface Cascade


@Deprecated(since="7") @Target({METHOD,FIELD}) @Retention(RUNTIME) public @interface Cascade
Deprecated.
Use the JPA-defined CascadeType
Specifies the persistence operations that should cascade to associated entity instances.

This annotation competes with the cascade member of JPA association mapping annotations, for example, with OneToMany.cascade(). The only good reason to use it over the standard JPA approach is to enable lock cascading, by writing, for example, @Cascade(LOCK).

If an association specified cascade types using both the JPA association mapping annotations and this annotation, then the cascade types from the two sources are aggregated.

  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    Deprecated.
    The operations that should be cascaded.
  • Element Details

    • value

      CascadeType[] value
      Deprecated.
      The operations that should be cascaded.