title: cascade delete with ManyToMany relation
body: <p>I have the following entities. I want to be able to delete a User and any entry in the UserGroupMap that contains that User should also get deleted. However everytime I try deleting a user that also has a entry in UserGroupMap I am getting the following error.<em>Cannot delete or update a parent row: a foreign key constraint fails</em> How can I achieve this behavior?</p>
  
  <pre><code>@Entity
  public class User {
  
     @Id
     private Long id;
  
     @Column
     private String name;
  
     @ManyToMany(mappedBy = "users", cascade = CascadeType.All)
     private Set&lt;Group&gt; groups;
  
   }
  
  
  @Entity
  public class Group {
  
     @Id
     private Long id;
  
     @Column
     private String type;
  
      @ManyToMany
      @JoinTable(name = "UserGroupMap", 
              joinColumns = @JoinColumn(name = "groupId", referencedColumnName = "id"), 
              inverseJoinColumns = @JoinColumn(name = "userId", referencedColumnName = "id") )
     private Set&lt;User&gt; users;
  
   }
  </code></pre>