[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-4957?page=c...
]
Gail Badner updated HHH-4957:
-----------------------------
Assignee: Gail Badner
Fix Version/s: 3.5.x
Olaf, thanks for checking!
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, 3.5.1
Environment: Hibernate: 3.5.0-CR-2
OS: Windows XP (should be OS independent)
IDE: Eclipse 3.5 Galileo
Reporter: Olaf Muliawan
Assignee: Gail Badner
Priority: Blocker
Fix For: 3.5.x
Attachments: HibernateCriteriaDistinctCount.zip
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