[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-3497?page=c...
]
Shawn Clowater commented on HHH-3497:
-------------------------------------
Are you really expecting to have more than 9,223,372,036,854,775,807 rows in any given
table?
With that said I'm a big fan of consistency and if HQL is returning a different type
than Criteria then I could see the case for that.
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:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira