[ 
https://issues.apache.org/jira/browse/SYNCOPE-1906?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andrea Patricelli resolved SYNCOPE-1906.
----------------------------------------
    Resolution: Resolved

> 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