I am running some simple MYSQL statements from a Java application. I get a syntax error in the instruction, which seems to work fine if I run it directly against the MYSQL server via Navicat. A statement that gives me hassle:
@NamedQuery(name = "Image.findDefaultByTest", query = "SELECT i FROM Image i where (i.test_id = :test) LIMIT 0,1")
The error I am getting is:
Syntax error parsing the query [Image.findDefaultByTest: SELECT i FROM Image i where (i.test_id = :test) LIMIT 0,1], line 1, column 48: syntax error at [LIMIT].
Just to give an example of the instruction on the above line:
@NamedQuery(name = "Image.findByLocation", query = "SELECT i FROM Image i WHERE i.location = :location")
Any help on this would be greatly appreciated, the only information I can find on this through Google has been since 2003!
chvck source share