-->
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.  [ 6 posts ] 
Author Message
 Post subject: BUG: paging with Oracle
PostPosted: Fri Apr 29, 2005 5:28 am 
Beginner
Beginner

Joined: Thu Nov 25, 2004 7:07 am
Posts: 43
Location: Germany
I think I found a bug with the paging option for Oracle. When I use setFirstResult(int) it seems to be ignored and be set to zero.

The SQL statement below is correct! But I set the following values:

firstResult: 1000
maxResult: 2001
list size before sql: null

The size of the result list was:
list size after sql: 2001

As I paged down the result become bigger and bigger (+ pageSize for each select). Can I somehow display the bind variables which are set for the statement?

As I couldn't find it in the changelog for 3.0.2 I didn't update so far.

TIA,
caterham


Hibernate version:
3.0.1
Name and version of the database you are using:
Oracle 9.2.0.6
The generated SQL (show_sql=true):
select * from ( select row_.*, rownum rownum_ from ( select [...] from SIGNALPARAMS this_ where this_.SIG_AUFS_ID=? ) row_ where rownum <= ?) where rownum_ > ?

_________________
You'll never get a second chance to make a first impression!


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 29, 2005 8:39 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 3:00 pm
Posts: 1816
Location: Austin, TX
Quote:
Can I somehow display the bind variables which are set for the statement?

enabled debug level logging on org.hibernate.type


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 29, 2005 9:41 am 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
FAQ!


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 29, 2005 10:30 am 
Beginner
Beginner

Joined: Thu Nov 25, 2004 7:07 am
Posts: 43
Location: Germany
steve wrote:
FAQ!

Just the one with the bind variables? Or even the problem with the setFirstResult(int) stuff? I couldn't find anything in the FAQ! Sorry.

steve wrote:
enabled debug level logging on org.hibernate.type

That didn't work. I don't get any bind variables printed out on the console. The log level for the handler is set correctly.

But the main reason for this post remains the same.
I can set firstResult but it seems to be ignored.

TIA,
caterham

_________________
You'll never get a second chance to make a first impression!


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 29, 2005 10:59 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
max results is the page size, not the maximum row number.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 29, 2005 12:48 pm 
Beginner
Beginner

Joined: Thu Nov 25, 2004 7:07 am
Posts: 43
Location: Germany
gavin wrote:
max results is the page size, not the maximum row number.


Thanks. After thinking about the method name it was clear for me too. ;-)

_________________
You'll never get a second chance to make a first impression!


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 6 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.