Kiril Fabisevich [
https://community.jboss.org/people/kirilik] created the document:
"MySQL := hibernate problem"
To view the document, visit:
https://community.jboss.org/docs/DOC-48840
--------------------------------------------------------------
Hello,
As I saw here, I added \\ to the query
set @row = 0;
select u.id, u.facebook, u.firstName, u.lastName, u.credit,
(SELECT row FROM (SELECT id, @row \\:= @row+1 AS row from Users ORDER BY credit desc) drv
WHERE id = u.id) AS place
from Users u
I'm getting the below exception:
Caused by: 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 'select u.id, u.facebook, u.firstName, u.lastName, u.credit,
This query works fine without hibernate
I'm using hibernate 4.2.2
Thanks,
Kiril
--------------------------------------------------------------
Comment by going to Community
[
https://community.jboss.org/docs/DOC-48840]
Create a new document in JBoss AS 7 Development at Community
[
https://community.jboss.org/choose-container!input.jspa?contentType=102&a...]