Mujir | #1432 | fixed a hibernate upgrade issue.
In upgraded hibernate, select count(*) queries,
1. createQuery() returns a long
2. createSqlQuery() returns a BigInteger