Details
-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
None
-
None
Description
We are attempting to use GroupAttributeFilter to find groups having a particular attribute value. The code looks like this:
GrouperSession gs = <get session>
GroupAttributeFilter gaf = new GroupAttributeFilter(
"bath:provisionClass", "groupmanager-groups",
StemFinder.findRootStem(gs));
Set<Group> ggroups = gaf.getResults(gs);
No results are returned. This appears to be because in Hib3GropDAO.findAllByApproximateAttrHelper the following code...
String attributePrefix = legacyAttributeStemName + ":" + legacyAttributePrefix; if (attr.startsWith(attributePrefix)) {
byHql.setString("attributeName", attr); } else {
byHql.setString("attributeName", attributePrefix + attr); }
...is actually setting the name of the attribute being examined to:
etc:legacy:attribute:legacyAttribute_bath:provisionClass
Are we missing something, or is there a bug here?
We are using version 2.3.0 of the grouper Maven artifact, but this code seems unchanged in the latest updates to GitHub.