Hibernate version:
3.2.0.ga
Name and version of the database you are using:
Informix 10
The generated SQL (show_sql=true):
select count(*) as y0_ from table1 this_ order by this_.id asc
How the query occurs:
I have a Page object that receives a criteria object to perform a paged search. The Page object, before performing the actual search, tries to count the number of matched records as follows:
Code:
this.totalResultCount = ((Integer) criteria.setProjection(
Projections.rowCount()).uniqueResult()).intValue();
The problem is that the generated SQL breaks informix due to the ORDER BY clause; if that is removed the count() function works just fine.
Is this an Informix dialect bug? Can i bypass the issue API-wise?
Many thanks,
Manos