-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: unexpected token: on
PostPosted: Wed Jun 03, 2009 6:41 am 
Newbie

Joined: Wed Jun 03, 2009 6:19 am
Posts: 1
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.