From the source I am going to say in HQL yes it should by default always return a long.
STANDARD_AGGREGATE_FUNCTIONS.put( "count", new StandardSQLFunction("count") {
public Type getReturnType(Type columnType, Mapping mapping) {
return Hibernate.LONG;
}
} );
However, it would appear the criteria API would return an Integer. Also, the reference docs seem to imply that it would also be an Integer. However, the code will win and you're ending up with a Long.
_________________ Some people are like Slinkies - not really good for anything, but you still can't help but smile when you see one tumble down the stairs.
|