Hi Pal,
Am getting the following error while executing this code
Hibernate Version = 2.0.0
Code :
int countIdx = countString.indexOf("order");
String queryString = "select count(*) from (" +countString.substring(0,countIdx) + ") as A ";
Query countQuery = SessionCreator.currentSession(NewGDCConstants.CURRENT_SESSION).createQuery(queryString);
int recordCount = Integer.parseInt(((Object[])countQuery.list().iterator().next())[0].toString());
Error:"net.sf.hibernate.QueryException: in expected: select [select count(*) from (select distinct "- followed by aggregate query.
Can You provide me the solution if any of you face this problem here before.
Thanks
Giri
|