What is the meaning of cascade?
This article introduces the relevant knowledge of "what is the meaning of cascade". In the operation of actual cases, many people will encounter such a dilemma. Then let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
1.Cascade = "none", the default value, tells Hibernate to ignore relationships.
2. Cascade = "save-update" tells Hibernate to navigate the association when the transaction commits, when the object is passed to the save () or update () method and saves the newly initialized instantaneous instance and persists the change to the detached instance.
3. Cascade= "delete" tells Hibernate to navigate the association and delete the persistent instance when the object is passed to delete ().
4. Cascad = "all" means that both save-update and delete are cascaded, just like calling evict and lock.
5. Cascade = "all-delete-orphan", same as cascade= "all", but other than that, Hibernate removes any instances of persistent entities that have been removed from the association (for example, from the collection) (no longer referenced).
6. Cascade = "delete-orphan", Hibernate will delete any instances of persistent entities that have been removed from the association (for example, from the collection) (no longer referenced).
This is the end of the content of "what is the meaning of cascade". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!