title: How to solve following issue in java?
body: <p>Im getting following error while running the query.</p>
  
  <pre><code>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']
  </code></pre>
  
  <p>This is my Query.Please give the suggession what is the mistake in this query?</p>
  
  <pre><code>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']
  </code></pre>