title: Hibernate Envers: No delete entry in audit table for cascading deletes
body: <p>I'm using Hibernate envers to track all changes made to my database objects. These objects are sometimes related by a (uni-directional) parent-child relationship. Because I need queries that are supposed to list all deleted objects, I'm relying on the audit table on envers to mark deleted objects (revtype column in *_aud table). However, these entries don't seem to be created for any of my child objects when their parent object gets deleted.</p>
  
  <p>My object class looks like this:</p>
  
  <pre><code>@Entity
  @Audited
  public class MyClass {
  
  @Id
  @GeneratedValue(strategy = GenerationType.AUTO)
  private Long id;
  
  @Column(nullable = false, unique = false, length = 1024)
  private String name;
  
      // An object can have exactly one parent, but multiple children
  @ManyToOne
  @OnDelete(action = OnDeleteAction.CASCADE)
  private MyClass parent;
  
  }
  </code></pre>
  
  <p>I'm suspecting it has something to do with the cascade delete action that somehow bypasses hibernate envers. How can I achieve that the entries in the audit table for the children objects are created while still making sure that all children get automatically deleted by the database when the referenced parent is deleted?</p>