Top Description Methods
org.hibernate.annotations

public @Interface Cascade

extends Annotation
Annotations
@Target:METHOD, FIELD
@Retention:RUNTIME
Imports
java.lang.annotation.Retention, .Target

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 jakarta.persistence.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.

Authors
Emmanuel Bernard, Steve Ebersole

Method Summary

Modifier and TypeMethod and Description
public CascadeType[]
value()

The operations that should be cascaded.

Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString

Method Detail

valueback to summary
public CascadeType[] value()

The operations that should be cascaded.