title: JPA: unidirectional many-to-one and cascading delete
body: <p>Say I have a <em>unidirectional</em> <code>@ManyToOne</code> relationship like the following:</p>
  
  <pre><code>@Entity
  public class Parent implements Serializable {
  
      @Id
      @GeneratedValue
      private long id;
  }
  
  @Entity
  public class Child implements Serializable {
  
      @Id
      @GeneratedValue
      private long id;
  
      @ManyToOne
      @JoinColumn
      private Parent parent;  
  }
  </code></pre>
  
  <p>If I have a parent P and children C<sub>1</sub>...C<sub>n</sub> referencing back to P, is there a clean and pretty way in JPA to automatically remove the children C<sub>1</sub>...C<sub>n</sub> when P is removed (i.e. <code>entityManager.remove(P)</code>)? </p>
  
  <p>What I'm looking for is a functionality similar to <code>ON DELETE CASCADE</code> in SQL.</p>