title: @ManyToOne JPA association and cascade... not sure what happens if I delete an object
body: <p>I'm still not very clear about the way cascade works in deletion operations. I was wondering what happens if I have this:</p>
  
  <pre><code>class myBean{
  
      @ManyToOne(fetch = FetchType.LAZY, cascade = CascadeType.ALL)
          public Cliente getClienteDiAppartenenza() {
              return clienteDiAppartenenza;
          }
  
  }
  
  
  class Cliente{
  @OneToMany(cascade = CascadeType.ALL, orphanRemoval = true, fetch = FetchType.LAZY)
      public List&lt;myBean&gt; getMyBeans() {
          return myBeans;
      }
  }
  </code></pre>
  
  <p>if I delete the myBean with this property I'm not sure if the linked Cliente will be deleted too (weird in a manytoone) or the collection inside Cliente will be updated and that instance of myBean removed, then saved.</p>
  
  <p>What will happen?? Hibernato docs aren't very clear about this...</p>