[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-5179) Criteria Projections.countDistinct() does not work for composite IDs or components for some dialects

Gail Badner (JIRA) noreply at atlassian.com
Thu Apr 29 19:37:29 EDT 2010


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-5179?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=36798#action_36798 ] 

Gail Badner commented on HHH-5179:
----------------------------------

Strong, I'm not sure which dialects are affected by failures in:
- org.hibernate.test.criteria.CriteriaQueryTest
- org.hibernate.test.hql.CriteriaHQLAlignmentTest

This didn't show up in the most recent build.

Please let me know which dialects are affected and I'll tweak the tests so they don't fail.

> Criteria Projections.countDistinct() does not work for composite IDs or components for some dialects
> ----------------------------------------------------------------------------------------------------
>
>                 Key: HHH-5179
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5179
>             Project: Hibernate Core
>          Issue Type: Improvement
>          Components: query-criteria
>    Affects Versions: 3.5.1
>         Environment: hsqldb, mssql
>            Reporter: Gail Badner
>            Assignee: Gail Badner
>            Priority: Minor
>
> Criteria Projections.countDistinct() does not work for composite IDs or compenents if the dialect only supports SELECT COUNT( DISTINCT ... ) with only 1 argument.
> According to http://msdn.microsoft.com/en-us/library/ms175997.aspx , a SQL workaround is:
> SELECT COUNT(*) FROM (SELECT DISTINCT authorFirstName, authorLastName, authorMiddleName, authorId from Authors) as foo

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list