title: JPA OneToMany not deleting child
body: <p>I have a problem with a simple <code>@OneToMany</code> mapping between a parent and a child entity. All works well, only that child records are not deleted when I remove them from the collection.</p>
  
  <p>The parent:</p>
  
  <pre><code>@Entity
  public class Parent {
      @Id
      @Column(name = "ID")
      private Long id;
  
      @OneToMany(cascade = {CascadeType.ALL}, mappedBy = "parent")
      private Set&lt;Child&gt; childs = new HashSet&lt;Child&gt;();
  
   ...
  }
  </code></pre>
  
  <p>The child:</p>
  
  <pre><code>@Entity
  public class Child {
      @Id
      @Column(name = "ID")
      private Long id;
  
      @ManyToOne(cascade = CascadeType.ALL)
      @JoinColumn(name="PARENTID", nullable = false)
      private Parent parent;
  
    ...
  }
  </code></pre>
  
  <p>If I now delete and child from the childs Set, it does not get deleted from the database. I tried nullifying the <code>child.parent</code> reference, but that did not work either.</p>
  
  <p>The entities are used in a web application, the delete happens as part of an Ajax request. I don't have a list of deleted childs when the save button is pressed, so I can't delete them implicitly. </p>