Hi "mark_in_gr",
Do you still have this problem or could you found a solution?
I have a similar or same problem since I swirched from
hibernate2 to
Hibernate version: 3.0.5 .
Could you please provide the generated SQL Statement!? In my case I found that the generated query is wrong. I dont understand why and how to fix this.
In my case the generated query is:
Code:
select count(*) as col_0_0_ from WebLogEntry weblogentr0_ where webLogID='8a80b8cf069ee33901069ee365bb0006' order by (weblogentr0_.position, weblogentr0_.webLogID)
My SourceCode and query is:
Code:
SELECT COUNT(*) FROM WebLogEntry WHERE webLogID = '8a80b8cf069ee33901069ee365bb0006' ORDER BY position
Query q = session.createQuery(countQuery);
Integer count = (Integer)q.uniqueResult();
I found that problem are the
brackets in the order by section. If I remove them it is no problem to execute the query.
Greetings,
Chris