Hibernate relationships, with a focus on understanding cascade cascade and Inverse
1, cascade generally used in cascade save, Cascade Update, Cascade Delete on
There are two types of 1.1cascade annotations, one based on hibernate annotations
Org.hibernate.annotations.Cascade
Org.hibernate.annotations.CascadeType
Support cascading
All, persist//cascade persistence, cascade events are triggered when session.persist () is called
merge//cascade Save or UPDATE, JPA specification hibernate to support Jsr220 added later, call Session.merge () when the cascade is triggered
remove,//Cascade Delete, JPA specification Ditto, trigger when call Session.delete ()
REFRESH, delete,//cascade Delete, Session.delete () trigger
save_update,//cascade Save or update Session.save (), Session.update (), session.saveorupdate (); REPLICATE,
Hibernate corresponds to the relationship cascade meaning