Hello,
I noticed that the projection returned from Projections.rowCount() returns the count as an Integer type, while the corresponding HQL count(*) returns a Long type.
Shouldn't they both return longs?
Code:
Object p = session.createCriteria(Message.class).setProjection(
Projections.rowCount()).uniqueResult();
// prints java.lang.Integer
System.out.println(p.getClass());
Object q = session.createQuery("select count(*) from Message").uniqueResult();
// prints java.lang.Long
System.out.println(q.getClass());
I'm using hibernate 3.2.2.ga
Thanks,
-Corey