Criteria Projections.countDistinct() function broken
----------------------------------------------------
Key: HHH-4957
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-4957
Project: Hibernate Core
Issue Type: Bug
Components: core
Affects Versions: 3.5.0-CR-2
Environment: Hibernate: 3.5.0-CR-2
OS: Windows XP (should be OS independent)
IDE: Eclipse 3.5 Galileo
Reporter: Lin Lai Fu
Priority: Blocker
The criteria countDistinct() does not generate the correct query:
criteria.setProjection(Projections.countDistinct("id"));
generates: select count(id)
instead of: select count(distinct id)
This used to work in version 3.3.2-GA with toSqlString(). This method is missing in 3.5.0
Working version in 3.3.2-GA:
http://viewvc.jboss.org/cgi-bin/viewvc.cgi/hibernate/core/trunk/core/src/...
Broken version in 3.5.0:
http://viewvc.jboss.org/cgi-bin/viewvc.cgi/hibernate/core/trunk/core/src/...
See also the forum thread:
http://forum.hibernate.org/viewtopic.php?f=1&t=1002910
--
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