I have the following query
String query = " select id, invited_user " + " from Invitations left join AdvertisementPrint "+ " on Invitations.invited_user = AdvertisementPrint.sender_id"; log.debug(query); return getHibernateTemplate().find(query);
I am getting the following error
| org.springframework.orm.hibernate3.HibernateQueryException: unexpected token: on near line 1, column 76 [ select id, invited_user from Invitations left joi n AdvertisementPrint on Invitations.invited_user = AdvertisementPrint.sender_i d]; nested exception is org.hibernate.hql.ast.QuerySyntaxException: unexpected t oken: on near line 1, column 76 [ select id, invited_user from Invitations lef t join AdvertisementPrint on Invitations.invited_user = AdvertisementPrint.sen der_id]
But the same query is working fine in MYSQL query edtior. How to rectify the problem?
Thanks in advance
Nagarak
|