[ https://issues.apache.org/jira/browse/CAY-2842?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17815273#comment-17815273 ]
Jurgen Doll commented on CAY-2842: ---------------------------------- Created a [PR|https://github.com/apache/cayenne/pull/605] containing a failing test and a potential solution that passes the tests. > Prevent duplicate select columns when using distinct with order by > ------------------------------------------------------------------ > > Key: CAY-2842 > URL: https://issues.apache.org/jira/browse/CAY-2842 > Project: Cayenne > Issue Type: Improvement > Components: Core Library > Affects Versions: 4.2 > Reporter: Jurgen Doll > Priority: Minor > Labels: pull-request-available > Time Spent: 10m > Remaining Estimate: 0h > > When a "select distinct" query has an "order by" clause then the "order by" > fields must also be listed in the select clause. However no check is > currently done to see if the column is already specified which can result in > duplicate columns being fetched. > This is listed as a TODO item in OrderingStage. -- This message was sent by Atlassian Jira (v8.20.10#820010)