-
Bug
-
Resolution: Done
-
Critical
-
PLINK_2.5.2.FInal, PLINK_2.7.0.Beta1
-
None
In my test I created some test user:
User user1 = createUser("a", "a", "a", "a", "a"); User user2 = createUser("b", "b", "b", "b", "b"); User user3 = createUser("c", "c", "c", "c", "c"); User user4 = createUser("d", "d", "d", "d", "d");
Next if I want to find all users ordered by lastName, I create follow queries:
IdentityQuery<User> userIdentityQuery1 = identityManager.createIdentityQuery(User.class) .setLimit(max) .setOffset(offset) .setSortParameters(User.LAST_NAME) .setSortAscending(true); IdentityQuery<User> userIdentityQuery2 = identityManager.createIdentityQuery(User.class) .setLimit(max) .setOffset(offset) .setSortParameters(User.LAST_NAME) .setSortAscending(false);
The result lists of both queries are equal.
I debugged into JPAIdentityStore.fetchQueryResults(...) and saw, that the sort parameters will not be read. The method orderBy of CriteriaQuery will not be called.
The FileIdentityStore.fetchQueryResults(...) uses the FileSortingComparator to sort the result. I can use it too, but it is better to use the jpa means.