KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I think I misunderstood the meaning of cascading in the context of a @ManyToOne relationship. The case: public class User { @OneToMany(fetch = FetchType.EAGER) protected Set<Address> userAddresses; } public class Address { @ManyToOne(fetch = FetchType.LAZY, cascade = CascadeType.ALL) protected User addressOwner; } What is the meaning of the cascade = CascadeType.ALL ? For example, if I delete a certain address from the database, how does the fact that I added the cascade = CascadeType.ALL affect my data (the User , I guess)?
Tags (comma-separated)
Save Edits
Cancel