title: Removing childs from @OneToMany-association: CascadeType.ALL + orphanRemoval = true not working
body: <p>I'm having a hard time removing childs from a OneToMany-association. My entities:</p>
  
  <pre><code>@Entity
  @Table(name = "PERSON")
  public class PersonEntity extends BaseVersionEntity&lt;Long&gt; implements Comparable&lt;PersonEntity&gt;
  {
    ...
    // bi-directional many-to-one association to Project
    @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "person", orphanRemoval = true)
    private final Set&lt;ProjectEntity&gt; projects = new HashSet&lt;ProjectEntity&gt;();
    ...
  
  @Entity
  @Table(name = "PROJECT")
  public class ProjectEntity extends BaseVersionEntity&lt;ProjectPK&gt;
  {
    @EmbeddedId
    private ProjectPK id;
    ...
    // bi-directional many-to-one association to UdbPerson
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "PERSON_ID", nullable = false, insertable = false, updatable = false)
    private PersonEntity person;
    ...
  
  @Embeddable
  public class ProjectPK implements Serializable
  {
    // default serial version id, required for serializable classes.
    private static final long serialVersionUID = 1L;
  
    @NotNull
    @Column(name = "PERSON_ID")
    private Long personId;
    ...
  </code></pre>
  
  <p>My unsuccessful attempt to delete the childs:</p>
  
  <pre><code>personEntity.getProjects().clear();
  </code></pre>
  
  <p>This works, but I don't think thats the right approach:</p>
  
  <pre><code>for (Iterator&lt;ProjectEntity&gt; iterator = personEntity.getProjects().iterator(); iterator.hasNext();)
  {
    ProjectEntity projectEntity = iterator.next();
    projectDao.deleteEntity(projectEntity);
    iterator.remove();
  }
  </code></pre>
  
  <p>What am I doing wrong here?</p>
  
  <p>Thanks<br>
  Jonny</p>