How to solve following issue in java?

Posted by lakshmi on Stack Overflow See other posts from Stack Overflow or by lakshmi
Published on 2010-06-08T07:23:02Z Indexed on 2010/06/08 7:32 UTC
Read the original article Hit count: 291

Filed under:
|

Im getting following error while running the query.

org.hibernate.hql.ast.QuerySyntaxException: expecting CLOSE, found 'LIMIT' near line 1, column 194 [from com.claystone.db.Gpsdata where id.mobileunitid = '2090818044' and gpsdate in (select id.gpsdate from com.claystone.db.Gpsdata where id.mobileunitid = '2090818044' ORDER BY id.gpsdate DESC LIMIT 1 )  and gpsstatus='true']

This is my Query.Please give the suggession what is the mistake in this query?

data=session.createQuery[from com.claystone.db.Gpsdata where id.mobileunitid = '2090818044' and gpsdate in (select id.gpsdate from com.claystone.db.Gpsdata where id.mobileunitid = '2090818044' ORDER BY id.gpsdate DESC LIMIT 1 )  and gpsstatus='true']

© Stack Overflow or respective owner

Related posts about java

Related posts about hibernate