title: What is difference between CascadeType.ALL, cascade = CascadeType.REMOVE and orphanRemoval
body: <p>I searched the answer but I could not get it properly. What is difference between <code>CascadeType.ALL</code>, cascade = <code>CascadeType.REMOVE</code>, <code>orphanRemoval</code> when we set <code>FetchType.EAGER</code> on <code>@OneToMany</code> relationship?
  Once I had a problem while deleteing records. I have used following</p>
  
  <pre><code>@OneToMany(cascade = CascadeType.ALL, mappedBy = "companyEntity", fetch = FetchType.EAGER)
  Set&lt;EmployeeEntity&gt; employeeEntities;
  </code></pre>
  
  <p>When I tried to delete Employee record, it was not showing me any exception and it was not deleteing record. But when I changed <code>CascadeType.ALL</code> to <code>CascadeType.REMOVE</code> then it was working.
  Why it was not working with <code>CascadeType.ALL</code> rather with <code>CascadeType.REMOVE</code>?</p>
  
  <p>Thank you for simple explanation in advance ;)</p>