About
The cascade parameter on a relationship defines the entity operation that must be cascaded to the target of the association.
See cascadeType
For all entities Y referenced by a relationship from X, if the relationship to Y has been annotated with the cascade element value cascade=PERSIST or cascade=ALL, the persist operation is applied to Y.
Bidirectional relationships between managed entities will be persisted based on references held by the owning side of the relationship.
The effect of the cascading of persist, merge, remove, or detach is immediately visible to the contains method, whereas the actual insertion, modification, or deletion of the database representation for the entity may be deferred until the end of the transaction.