In my app I have these Hibernate-mapped types (general case):
class RoleRule {
private Role role;
private PermissionAwareEntity entity; // hibernate-mapp
I'm not sure if this is the solution, but you might want to try:
@OneToMany(mappedBy = "role")
And not have the @JoinColumn annotation? I think both entities are trying to 'own' the association, which is why the SQL might be messed up?
Also, if you want to ensure only affected columns get updated, you can use a hibernate-specific annotation on the class:
@Entity
@org.hibernate.annotations.Entity(
dynamicInsert = true, dynamicUpdate = true
)