JPA: Circular relations: diff between EclipseLink and Hiberante
问题 We have an entity Role which could be either users or groups. In the groups we have set permissions. Therefore a user belongs to a group. Additionally groups can belong to other groups, i.e. one could make a hierarchy of permissions. The idea is to store the relations from e.g. user -> group into a separate db table role_ref . @Table(name = "role__parent") @IdClass(RoleAssociationKey.class) @Data public class RoleAssociation implements Serializable { @Id @JoinColumn(name = "has_parent_role_id