[hibernate-issues] [Hibernate-JIRA] Closed: (HHH-3497) Criteria row count return value in the type of Integer, not Long

Steve Ebersole (JIRA) noreply at atlassian.com
Wed Jun 3 18:19:13 EDT 2009


     [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-3497?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

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: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the hibernate-issues mailing list