-->
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.  [ 2 posts ] 
Author Message
 Post subject: how to specify "Limit" in hibernate
PostPosted: Fri Mar 09, 2007 2:19 am 
Beginner
Beginner

Joined: Mon Feb 05, 2007 2:33 am
Posts: 32
hei i have wrote the following query and when i try to execute it . its not converted into hql.

select from CntGroup Limit 3,8;

where as i am using mysql.

= select from CntGroup Limit 3,8
ERROR [http-8080-Processor25] (ErrorCounter.java:33) - line 1:8: unexpected token: from
org.hibernate.hql.ast.QuerySyntaxException: unexpected token: from near line 1, column 8 [se
t.CntGroup Limit 3,8]
at org.hibernate.hql.ast.ErrorCounter.throwQueryException(ErrorCounter.java:59)
at org.hibernate.hql.ast.QueryTranslatorImpl.parse(QueryTranslatorImpl.java:244)
at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:155)

please help me to over come on this


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 09, 2007 3:21 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
setFirstResult
setMaxResults

See
http://www.hibernate.org/hib_docs/v3/api/ Query interface


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

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.