Actions
Defect #1551
closedMethod 'findIds' doesn't work with page request
Start date:
03/14/2019
Due date:
% Done:
100%
Estimated time:
Affected versions:
Owner:
Description
The method findIds doesn't use correctly order by.
Example:
Pageable pageable = new PageRequest(0, 100, new Sort(Direction.ASC, IdmIdentity_.username.getName())); Page<UUID> identities = identityService.findIds(filter, pageable, IdmBasePermission.READ);
throw error:
aused by: java.lang.IllegalArgumentException: Error occurred validating the Criteria at org.hibernate.jpa.criteria.compile.CriteriaCompiler.compile(CriteriaCompiler.java:61) at org.hibernate.jpa.spi.AbstractEntityManagerImpl.createQuery(AbstractEntityManagerImpl.java:736) at sun.reflect.GeneratedMethodAccessor147.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.springframework.orm.jpa.ExtendedEntityManagerCreator$ExtendedEntityManagerInvocationHandler.invoke(ExtendedEntityManagerCreator.java:344) at com.sun.proxy.$Proxy160.createQuery(Unknown Source) at sun.reflect.GeneratedMethodAccessor147.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.springframework.orm.jpa.SharedEntityManagerCreator$SharedEntityManagerInvocationHandler.invoke(SharedEntityManagerCreator.java:294) at com.sun.proxy.$Proxy160.createQuery(Unknown Source) at eu.bcvsolutions.idm.core.api.service.AbstractReadDtoService.findIds(AbstractReadDtoService.java:226) at eu.bcvsolutions.idm.core.api.service.AbstractReadDtoService$$FastClassBySpringCGLIB$$120a9283.invoke(<generated>) at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:651) at eu.bcvsolutions.idm.core.model.service.impl.DefaultIdmIdentityService$$EnhancerBySpringCGLIB$$dc3f1ab.findIds(<generated>) at eu.bcvsolutions.idm.rpt.report.identity.IdentityRoleByIdentityDeduplicationExecutor.generateData(IdentityRoleByIdentityDeduplicationExecutor.java:102) at eu.bcvsolutions.idm.rpt.report.identity.IdentityRoleByIdentityDeduplicationExecutor$$EnhancerBySpringCGLIB$$bd53d1b3.generateData(<generated>) at eu.bcvsolutions.idm.rpt.api.executor.AbstractReportExecutor.generate(AbstractReportExecutor.java:64) ... 29 common frames omitted Caused by: java.lang.IllegalStateException: No criteria query roots were specified at org.hibernate.jpa.criteria.CriteriaQueryImpl.validate(CriteriaQueryImpl.java:273) at org.hibernate.jpa.criteria.compile.CriteriaCompiler.compile(CriteriaCompiler.java:58) ... 48 common frames omitted
Actions