• Post Reply Bookmark Topic Watch Topic
  • New Topic

count(1) raising an error unexpected token: 1  RSS feed

 
aravind yarram
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Mark Spritzler
ranger
Sheriff
Posts: 17309
11
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yeah, just change it to an attribute of Csa.

Mark
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!