title: JPA Cascade Delete with ManyToOne without OneToMany
body: <p>I have the following structure of objects:</p>
  
  <pre><code>public class Entity1 {  
  
      @OneToMany(orphanRemoval=true)
      private List&lt;Entity2&gt; listOfEntitys;
      ... 
  }
  
  public class Entity2 {  
  
      @OneToMany(orphanRemoval=true)
      private List&lt;Entity3&gt; listOfEntitys;
      ... 
  }
  
  public class Entity3 {  
      ...
  }
  
  //Here it can be thousand of it for one entity3
  public class Entity4 {  
  
      @ManyToOne
      private Entity3 entity;
          ... 
  }   
  </code></pre>
  
  <p>Now, I want delete <code>Entity1</code> and all entities should delete on cascade, too. <br>
  The Problem is,... how can I delete all <code>entitys4</code> on cascade?</p>
  
  <p>I have tried 2 solutions:</p>
  
  <ul>
  <li><p>I add a list on entity3 and delete it on cascade.</p></li>
  <li><p>I make two querys: first I select all <code>entitys3</code> that could be in <code>entity1</code> -> <code>entity2</code> than I delete all <code>entitys4</code> with it. After it I can delete <code>entity1/2/3</code> normally per cascade because the entity reference from <code>4</code> to <code>3</code> is erased.</p></li>
  </ul>
  
  <p>Give it another solution? Which solution should I prefer?</p>