Hibernate corresponds to the relationship cascade meaning

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.