title: What is the meaning of the CascadeType.ALL for a @ManyToOne JPA association
body: <p>I think I misunderstood the meaning of cascading in the context of a <code>@ManyToOne</code> relationship.</p>
  
  <p>The case:</p>
  
  <pre><code>public class User {
  
     @OneToMany(fetch = FetchType.EAGER)
     protected Set&lt;Address&gt; userAddresses;
  
  }
  
  public class Address {
  
     @ManyToOne(fetch = FetchType.LAZY, cascade = CascadeType.ALL)
     protected User addressOwner;
  
  }
  </code></pre>
  
  <p>What is the meaning of the <code>cascade = CascadeType.ALL</code>? For example, if I delete a certain address from the database, how does the fact that I added the <code>cascade = CascadeType.ALL</code> affect my data (the <code>User</code>, I guess)?</p>