-->
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 hibernate inserting "rownum < 100"
PostPosted: Fri Jul 09, 2004 3:56 pm 
Newbie

Joined: Fri Jul 09, 2004 3:20 pm
Posts: 1
Hibernate version 2.1
Oracle 8.1

I have the following piece of code in my application :

select("from FormEmployeeImpl order by full_name");

which generates the following SQL :

select * from ( select formemploy0_.EMP_ID as EMP_ID, formemploy0_.FULL_NAME as FULL_NAME, formempl
oy0_.EMAIL as EMAIL, formemploy0_.LOGIN as LOGIN from FORM_EMPLOYEE formemploy0_ order by full_name ) where
rownum <= ?

The value of the "?" parameter is set to 100.

I'm puzzled :

1. Why hibernate is putting the encapsulating statement
around the select statement? Can I get hibernate
not to use encapsulating statements. By encapsulating
I mean the "select * " statement.

2. Where is the value of 100 coming from ? Was something
configured (that I don't know about) which says
"limit all query results to 100"?

3. If all else fails ... is there a way to set the value of 100 to 1000000 or some
super large number so I can get all the results from the query?

Thanks,


em


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 09, 2004 3:57 pm 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
Are you sure you don't set maxResult()/firstResult() in your query?

_________________
JAVA PERSISTENCE WITH HIBERNATE
http://jpwh.org
Get the book, training, and consulting for your Hibernate team.


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.