setMaxResults() doesn't work with MySql - sql syntax error [message #550659] |
Wed, 04 August 2010 01:41  |
Eclipse User |
|
|
|
i am using mysql(connector 5.1.12 and db 5.1.47) in conjunction with eclipselink 2.0.1. nearly all went fine so far but now i tried to limit a select statement's output with q.setMaxResults(x) but this yields a very strange Query:
"SELECT `Id` AS `Id`1, `column2` AS `column2`2, ... FROM table LIMIT 0, 5"
why "as `ID`1" - the error message says "syntax error near '1'"
Without the setMaxResults the syntax is right:
"SELECT `Id`, `column2`, ... FROM Table"
And with derby embedded driver both work. So it is a "EclipseLink with MySql" Problem?!
The settings in peristence.xml are nearly the same. the only differences are logging and "<property name="eclipselink.ddl-generation" value="drop-and-create-tables" />"
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03235 seconds