criteria.uniqueResult() is null when criteria.firstResult is NOT null when projection is
count
----------------------------------------------------------------------------------------------
Key: HHH-3206
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-3206
Project: Hibernate3
Issue Type: Bug
Components: query-criteria
Affects Versions: 3.2.5
Environment: JBoss 4.0/JDK 1.6/Oracle 10g
Reporter: Will Hoover
Priority: Minor
SYNOPSIS:
"criteria.uniqueResult()" is null when criteria.firstResult is NOT null when
projection is count. This happens regardless if using
"criteria.setProjection(Projections.countDistinct(distinctPropertyName));" or
"criteria.setProjection(Projections.rowCount())".
The reason why the criterias firstResult is not null is because we are reusing the same
criteria to perform "criteria.list()" as "criteria.uniqueResult()" to
avoid having to set all of the same restrictions etc. twice.
--
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