• Post Reply Bookmark Topic Watch Topic
  • New Topic

sql to hql error  RSS feed

 
Ugender Rekulampally
Ranch Hand
Posts: 135
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I need some help with converting SQL to HQL.

here is the query. (please know that I can't use createSQLQuery on EntityManager)



Above CountEntity is entity version of Count table.


Right now I am getting this error: ERROR org.hibernate.hql.PARSER - 18120 line 2:33: unexpected token: (

any suggestions?
 
Ugender Rekulampally
Ranch Hand
Posts: 135
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I fixed it by using createNativeQuery instead of createQuery on EntityManager.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!