Working around HHH-9663: Orphan removal does not work for OneToOne relations

HHH-9663 means that orphan removal doesn’t work for OneToOne relationships. For example, given File and FileContent as below (taken from the bug report): package pl.comit.orm.model; import javax.persistence.Entity;import javax.persistence.FetchType;import javax.persistence.Id;import javax.persistence.OneToOne; @Entitypublic class File {  private int id;  private FileContent content;  @Id public int getId() { return id; }  public void setId(int id) { this.id = id; }  … Continue reading Working around HHH-9663: Orphan removal does not work for OneToOne relations