[ 
https://issues.apache.org/jira/browse/SYNCOPE-1906?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18019309#comment-18019309
 ] 

ASF subversion and git services commented on SYNCOPE-1906:
----------------------------------------------------------

Commit 7aefc2227546fc7842b19976299f29d2502daf59 in syncope's branch 
refs/heads/3_0_X from Andrea Patricelli
[ https://gitbox.apache.org/repos/asf?p=syncope.git;h=7aefc22275 ]

[SYNCOPE-1906] fixed order by also on unique attributes (#1174)



> Wrong result order if sorting by plain attribute
> ------------------------------------------------
>
>                 Key: SYNCOPE-1906
>                 URL: https://issues.apache.org/jira/browse/SYNCOPE-1906
>             Project: Syncope
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 3.0.13, 4.0.1
>            Reporter: Andrea Patricelli
>            Assignee: Andrea Patricelli
>            Priority: Major
>             Fix For: 3.0.14, 4.0.2, 4.1.0
>
>          Time Spent: 50m
>  Remaining Estimate: 0h
>
> * Run Syncope with sample data on any DBMS
>  * Update users, for example the test ones, to have ctype attribute with 
> values [aa1, aa2, aa3, aa4, aa5]
>  * Perform a list query from console or directly via API to 
> {noformat}
> /syncope/rest/users?orderBy=ctype%20DESC{noformat}
>  (without filter) ordered by ctype, DESC (or ASC).
>  * Order of the result is not compliant with the requested one
> This is due to this search query
> {code:java}
> SELECT DISTINCT sv.any_id,sva.stringValue AS ctype FROM user_search sv LEFT 
> JOIN user_search_attr sva ON sv.any_id=sva.any_id WHERE ((id IS NOT NULL) AND 
> (realm_id IN (?1,?2,?3,?4))) ORDER BY ctype DESC{code}
> That returns and sorts on all results of the query containing all user 
> attributes, not only the one used for sorting.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to