You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@metamodel.apache.org by "Kasper Sørensen (JIRA)" <ji...@apache.org> on 2014/09/27 19:48:34 UTC
[jira] [Commented] (METAMODEL-78) simple SELECT DISTINCT returns
duplicates
[ https://issues.apache.org/jira/browse/METAMODEL-78?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14150673#comment-14150673 ]
Kasper Sørensen commented on METAMODEL-78:
------------------------------------------
Good catch! Would you be interested in supplying a patch too? And do remember a quick unittest for regressions.
> simple SELECT DISTINCT returns duplicates
> -----------------------------------------
>
> Key: METAMODEL-78
> URL: https://issues.apache.org/jira/browse/METAMODEL-78
> Project: Metamodel
> Issue Type: Bug
> Reporter: Ryan Berdeen
>
> Running {{SELECT DISTINCT name FROM table}} on a PojoDataContext returns duplicate names. Adding {{ORDER BY name}} fixes it.
> It looks like https://github.com/apache/incubator-metamodel/blob/master/core/src/main/java/org/apache/metamodel/QueryPostprocessDataContext.java#L159 matches, and returns without applying the {{DISTINCT}}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)