• Post Reply Bookmark Topic Watch Topic
  • New Topic

sql to hql error

 
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.
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!