which produces me a com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'starting, type, _id_usr_to, _id_usr_from FROM task WHERE (starting BETWEEN '2009'
Apparently a following query is being sent to MySQL:
Which MySQL rejects.
I changed the query manually to include the table qualifier and tested it directly on MySQL:
...and MySQL likes it. Now please help me get JPA to automatically use the table qualifier in the generated MySQL query.
Any help would be greatly appreciated.
Joined: Oct 29, 2009
I found out that starting is a reserved MySQL keyword, hence the MySQL syntax error.
Thanks for the suggestions.
Since I want to generate entity beans automatically in netbeans, I decided to just rename the column. Using quotes looks more like a hack to me and might cause some problems in the future.