aspose file tools*
The moose likes Object Relational Mapping and the fly likes SQL to Hibernate HQL conversion error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "SQL to Hibernate HQL conversion error" Watch "SQL to Hibernate HQL conversion error" New topic
Author

SQL to Hibernate HQL conversion error

Brinsley Dcunha
Greenhorn

Joined: Mar 10, 2012
Posts: 2
The following query works perfectly in MySQL but when I convert it to Hibernate HQL,
I get the following error :


ERROR PARSER line 1:128: unexpected token: (
ERROR PARSER line 1:172: unexpected token: count



Is there any solution to this ?
Thank you in advance for your help !
Vijitha Kumara
Bartender

Joined: Mar 24, 2008
Posts: 3775

What changes/modifications have you done to this HQL from your SQL? Perhaps you may post the SQL too?


SCJP 5 | SCWCD 5
[How to ask questions] [Twitter]
Brinsley Dcunha
Greenhorn

Joined: Mar 10, 2012
Posts: 2
I used the same SQL for the HQL conversion...no changes.
Thanks !
Brinsley
Cj Recto
Greenhorn

Joined: Mar 02, 2012
Posts: 26
This is also one of my problem. I dont know if it is possible in HQL.

This one is a simple query to illustrate,

SQL:


In HQL however, you cannot directly used the same concept, I dont know why, or if it is possible,
hope someone could actually have an answer to this.




 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: SQL to Hibernate HQL conversion error
 
Similar Threads
count(1) raising an error unexpected token: 1
Assigning values to a returned object from query
hibernate error unexpected token: (
Please help me to convert this SQL to hibernate query
Unexpected Token Problem