-->
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: Issue on using setFirstRes/setMaxRes FROM keyword not found
PostPosted: Wed Nov 07, 2007 1:58 pm 
Newbie

Joined: Wed Nov 07, 2007 1:48 pm
Posts: 2
Guys,

I am facing this issue when using setFirstResult/setMaxResults with either query or criteria objects...it gives with the error From Keyword not found..the query works fine if i dont use them

Below is the Criteria i am creating to fetch the results...Would appreciate any help...Using hibernate 3.2.5 with oracle 10g...

Code
------
personList = session.createCriteria(Person.class).
addOrder(Order.asc("firstName")).
setFirstResult(first).
setMaxResults(count).list();

ERROR LOG
------------------
Hibernate: select top ? this_.PERSONID as PERSONID0_, this_.FIRSTNAME as FIRSTNAME1_0_, this_.LASTNAME as LASTNAME1_0_, this_.MIDDLENAME as MIDDLENAME1_0_, this_.ADDRESS1 as ADDRESS5_1_0_, this_.CITY as CITY1_0_, this_.STATE as STATE1_0_, this_.ZIPCODE as ZIPCODE1_0_, this_.COUNTRY as COUNTRY1_0_, t
his_.EMAIL as EMAIL1_0_, this_.BIRTHDATE as BIRTHDATE1_0_ from PERSON this_ order by this_.FIRSTNAME
asc
WARN - JDBCExceptionReporter - SQL Error: 923, SQLState: 42000
ERROR - JDBCExceptionReporter - ORA-00923: FROM keyword not found where expected

Thanks in advance and Regards,

Farhan.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 07, 2007 4:53 pm 
Newbie

Joined: Wed Nov 07, 2007 1:48 pm
Posts: 2
Figured it out..was a dialect issue..


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.