triveni wrote:
Hi,
The following HQL is resulting in parsing error at count (1). The problem is at the numeric 1 I am using in the count function. If i use a column name instead of the constant, the query executes successfully. Is this a restriction of hibermate?
select count(1) from Csa c where c.equipment.equipmentType = 'MA'
Thanks for your help!
Hibernate version: 3.x
¿Why are you using a constant instance of the column name? you must use a column name within the count function. the use is exactly the same as SQL COUNT Sintaxys