Issue Type: Bug Bug
Assignee: Anil Saldhana
Components: IDM
Created: 29/Oct/13 2:48 PM
Description:

The following query:

identityManager.createIdentityQuery(User.class).setParameter(new AttributeParameter("hello")).getResultList();

Causes a StackOverflowError to be thrown by the CriteriaBuilder in Hibernate 4.3.0.Beta5. It works fine with Hibernate 4.2.7.Final.

The issue is caused by the following code in JPAIdentityStore:

subQuery.groupBy(subQuery.getSelection())

I'm not sure whether or not this is a Hibernate issue, or if it's PicketLink using Hibernate wrongly. The problem can easily be resolved in PicketLink though, by not using subQuery.getSelection() and instead use the following code:

Path selection = fromProject.get(ownerProperty.getName());
subQuery.select(selection);
...
subQuery.groupBy(selection).having(
                cb.equal(cb.count(selection), valuesToSearch.length));
Project: PicketLink
Priority: Major Major
Reporter: Stian Thorgersen
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira