-->
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: Problem with SetFirstResult(0).SetMaxResults(10)
PostPosted: Mon Jan 31, 2011 10:32 am 
Newbie

Joined: Mon Jan 31, 2011 10:19 am
Posts: 2
I am having an issue with Nhibernate returning no records (i am pretty sure it's not even hitting the database) when SetFirstResult(0) is set and i have a SetMaxResults(10) set. When I use SetFirstResult(1).SetMaxResults(10), i get records 2-11 from the database.

Any help is appreciated. I added a question on stackoverflow with some more detail and the code that i am using.

http://stackoverflow.com/questions/4832 ... -is-also-s

Thanks,
Brad


Top
 Profile  
 
 Post subject: Re: Problem with SetFirstResult(0).SetMaxResults(10)
PostPosted: Tue Feb 01, 2011 11:53 am 
Newbie

Joined: Mon Jan 31, 2011 10:19 am
Posts: 2
After going back and looking at this issue, i figured out what happened. I noticed that NHibernate was actually throwing an error. The message was "The query should start with 'SELECT' or 'SELECT DISTINCT". The first answer in http://stackoverflow.com/questions/2461 ... sqldialect solved my problem. I had to set use_sql_comments to false in my config file.


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.