]
Steve Ebersole closed HHH-3497.
-------------------------------
Resolution: Duplicate
Criteria row count return value in the type of Integer, not Long
----------------------------------------------------------------
Key: HHH-3497
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-3497
Project: Hibernate Core
Issue Type: Bug
Components: core
Affects Versions: 3.3.1
Environment: MySQL and Postgres
Reporter: Yang Lifan
I know the type of the return value of row count with HQL query is Long, to be compatible
with JPA. But the Criteria is still return in the type of Integer, not in Long. So if
there are a huge amount of data in the database, how can we get the right row count value
with Criteria.
=================================================
criteria.setProjection(Projections.rowCount());
Long result = Long.valueOf(criteria.uniqueResult().toString());
=================================================
I have to write like that to return the type of Long. But I know it is not real.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: