title: Entity update causes error: cascade="all-delete-orphan" was no longer referenced by the owning entity
body: <p>I have following table entities, In that I am trying update an existing record, while doing so i get following error. I know I'm doing some mistake in the entity definition but not able to figure it out.
  Appreciate your help.</p>
  
  <pre><code>                **A
          -------------------
          |                 |
          B                 C
                        ---------
                        |       |
                        D       E**
  
  @Entity
  @Table()
  public class A {
      @Id
      Long id;
  
      @OneToMany(fetch = FetchType.EAGER, cascade = CascadeType.ALL, orphanRemoval=true)
      @JoinColumn(name = "id", referencedColumnName="id",  nullable = false)
      private Set&lt;B&gt; b;
  
      @OneToMany(fetch = FetchType.EAGER, cascade = CascadeType.ALL, orphanRemoval=true)
      @JoinColumn(name = "id", referencedColumnName="ID",  nullable = false)  
      private Set&lt;C&gt; c;
  }
  
  @Entity
  @Table()
  public class B{
      @Id
      Long id;
  }
  
  @Entity
  @Table()
  public class C{
      @Id
      Long id;
      @OneToMany(fetch = FetchType.EAGER, cascade = CascadeType.ALL, orphanRemoval=true)
      @JoinColumn(name = "id", referencedColumnName="id",  nullable = false)
      private Set&lt;D&gt; D;
  
      @OneToMany(fetch = FetchType.EAGER, cascade = CascadeType.ALL, orphanRemoval=true)
      @JoinColumn(name = "id", referencedColumnName="ID",  nullable = false)  
      private Set&lt;E&gt; E;
  }
  
  @Entity
  @Table()
  public class D{
      @Id
      Long id;
  }
  
  @Entity
  @Table()
  public class E{
      @Id
      Long id;
  }
  </code></pre>
  
  <p>ERROR:</p>
  
  <p>org.hibernate.HibernateException: A collection with cascade="all-delete-orphan" was no longer referenced by the owning entity instance: com.entity.C.D</p>
  
  <pre><code>at org.hibernate.engine.internal.Collections.processDereferencedCollection(Collections.java:100) ~[hibernate-core-5.3.12.Final.jar:5.3.12.Final]
  at org.hibernate.engine.internal.Collections.processUnreachableCollection(Collections.java:51) ~[hibernate-core-5.3.12.Final.jar:5.3.12.Final]
  at org.hibernate.event.internal.AbstractFlushingEventListener.flushCollections(AbstractFlushingEventListener.java:262) ~[hibernate-core-5.3.12.Final.jar:5.3.12.Final]
  at org.hibernate.event.internal.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:95) ~[hibernate-core-5.3.12.Final.jar:5.3.12.Final]
  </code></pre>