-
Bug
-
Resolution: Done
-
Major
-
PLINK_2.5.2.FInal
-
None
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));