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

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

Commit 8db44e4cf0a860b22a12f7927ed2a2f78f9f063a in syncope's branch 
refs/heads/4_0_X from Andrea Patricelli
[ https://gitbox.apache.org/repos/asf?p=syncope.git;h=8db44e4cf0 ]

[SYNCOPE-1906] Fixing order by clause on plain attribute for mariadb and mysql 
(#1171)



> 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: 40m
>  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