0 Replies Latest reply on Aug 5, 2011 9:42 AM by Karsten Wutzke

    Identity management: concept of @RoleGroups for parents or children?

    Karsten Wutzke Expert

      I was wondering about the identity management @RoleGroups annotation. Since it maps to/from the same table, there will be one forward and basically one reverse (mappedBy="...") relationship to the same entity class, like:


      @RoleGroups
      @ManyToMany
      @JoinTable(name = "RoleLinks", joinColumns = @JoinColumn(name = "child_role_id", referencedColumnName = "role_id"), inverseJoinColumns = @JoinColumn(name = "parent_role_id", referencedColumnName = "role_id"))
      private Set<Role> parents = new HashSet<Role>();
      
      @ManyToMany(mappedBy = "parents")
      private Set<Role> children = new HashSet<Role>();



      One of them would represent the parents, the other the children. I could simply exchange the annotations for parents and children, but which one is the @RoleGroups annotation supposed to represent conceptually, parents or children?


      Karsten