ON CASCADE DELETE on JPA2 many-to-many relationship
问题 I have read a lot of topics regarding cascading and many-to-many associations, but I haven't been able to find an answer to my particular question. I have a many-to-many relationship between UserProfiles and Roles. When I remove a UserProfile I want the associated records in the join table (userprofile2role) to be removed by the database, so with an actual SQL 'ON DELETE CASCADE' action. Is this possible? Whatever I try, Hibernate always creates the UserProfile table without specifying ON