Uploaded image for project: 'PicketLink'
  1. PicketLink
  2. PLINK-219

Can not query groups via IdentityQuery by parent group

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • PLINK_2.7.0.Beta2
    • PLINK_2.5.0.Beta5
    • IDM
    • None

      When using JPA identity store with default configuration, there is no way to query groups by their parent group.
      Example:

      • We have one group called RootGRP with no parent, and groups SubGrpA and SubGrpB whoose parent is group RootGRP.
      • When trying to get groups that has group RootGRP as parent the following code
        {
        	Group rootGroup = identityManager.getGroup("/RootGRP");
        	List<Group> groups = identityManager.createIdentityQuery(Group.class).setParameter(Group.PARENT, rootGroup).getResultList();
        }
        

        fails with exception:
        org.picketlink.idm.IdentityManagementException: PLIDM000055: Could not query IdentityType using query [org.picketlink.idm.query.internal.DefaultIdentityQuery@330112b2].

      • When trying to put parent group id as parameter:
        {
        	Group rootGroup = identityManager.getGroup("/RootGRP");
        	List<Group> groups = identityManager.createIdentityQuery(Group.class).setParameter(Group.PARENT, rootGroup.getId()).getResultList();
        }
        

        Nothing is returned.

            psilva@redhat.com Pedro Igor Craveiro
            toptan_jira Toplica Tanasković (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: