0 Replies Latest reply on Oct 2, 2013 11:50 AM by nico.ben

    BasicModel.hasGroupRole: big amount of queries.

    nico.ben

      Hi,

      I am using picketLink 2.5.2.Final.

       

      In the API I haven't found a method to retrieve all group and roles associated to a user.

       

      So I tried with:

       

         for (Group group : groups) {
                  for (Role role : roles) {
                      boolean hasUserGroupRole = BasicModel.hasGroupRole(relationshipManager.get(), user, role, group);
      

       

       

      BUT one single call to

      BasicModel.hasGroupRole(relationshipManager.get(), user, role, group)

      generates a huge amount of queries (see the attached file to see the list).

       

      The iteration of the above cycle delays too much.

       

      Is there another option to retrieve ALL groups/roles associated to a user?

       

      Thx,

      Nico