You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by "Andrus Adamchik (JIRA)" <ji...@apache.org> on 2015/11/09 12:08:10 UTC

[jira] [Created] (CAY-2037) EJBQL: COUNT(DISTINCT .. ) doesn't properly translate paths ending with relationship

Andrus Adamchik created CAY-2037:
------------------------------------

             Summary: EJBQL: COUNT(DISTINCT .. ) doesn't properly translate paths ending with relationship
                 Key: CAY-2037
                 URL: https://issues.apache.org/jira/browse/CAY-2037
             Project: Cayenne
          Issue Type: Bug
    Affects Versions: 4.0.M2
            Reporter: Andrus Adamchik
            Assignee: Andrus Adamchik


Per http://mail-archives.apache.org/mod_mbox/cayenne-user/201510.mbox/%3C23A9D9A5-62EA-4B59-B5AD-57150A1A8349%40karlmenn.is%3E 

I did some investigation, and in most cases COUNT(DISTINCT ..) does the right thing. Except when a path inside count ends in relationship (e.g. COUNT(DISTINCT p.artist)), in which case it generates SQL "COUNT (DISTINCT *)" that produces incorrect result.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)