Saturday, 15 August 2015

mysql - HQL left join not working -



mysql - HQL left join not working -

trying write equivalent hql query next sql query:

(sql):

select * game g left bring together rollbackgame rb on g.id = rb.id rb.gameid null

(hql):

select g game g left bring together rollbackgame rb g.id = rb.gameid rb.gameid null

the hql not working me, ideas why? (is possible accomplish hql?)

edit: kind of error:

path expected join! [select g com.xxx.model.game.game g left bring together rollbackgame rb g.id = rb.gameid rb.gameid null

thanks

your hql should below:

select g game g left bring together rollbackgame rb g.id = rb.gameid rb.gameid null

you forgot as keyword before alias.

mysql hibernate hql

No comments:

Post a Comment