We're updating the issue view to help you get more done. 

Criteria Projections.countDistinct() does not work for composite IDs or components for some dialects

Description

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

Environment

hsqldb, mssql

Status

Assignee

Gail Badner

Reporter

Gail Badner

Components

Affects versions

3.5.1

Priority

Minor