Basically, this:
@Audited class Matter { @OneToMany( mappedBy = "matter", cascade = CascadeType.ALL, orphanRemoval = true, fetch = FetchType.LAZY ) private List<MatterDefendant> defendants; }
@Audited class MatterDefendant { @Id @ManyToOne @JoinColumn(name = "matter_id") private Matter matter; @Id @ManyToOne @JoinColumn(name = "contact_id") private Contact contact; }
Pretty much exactly the same as the user who raised this bug, in fact.