Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version: 3
MySQL version : 5.0.18-nt
This is my code in one of my hibernate daos:
Session session = getSession();
String query = "SELECT EXTRACT(YEAR_MONTH FROM s.StoreDate), sum(s.Bookings) from Summaryemp s where s.Employee.Id=? group by 1 ";
list = session.createQuery(query).setInteger(0, empid).list();
It gives me Error:
10:48:24,137 WARN [JDBCExceptionReporter] SQL Error: 0, SQLState: S1000
10:48:24,137 ERROR [JDBCExceptionReporter] Unknown type '246 in column 1 of 2 in
binary-encoded result set.
I dont know what is with my sum(s.bookings)? It is Integer!!!!