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....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira