-->
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.  [ 1 post ] 
Author Message
 Post subject: Is it a BUG in Hibernate?
PostPosted: Wed Oct 17, 2007 11:52 am 
Newbie

Joined: Fri Jul 28, 2006 9:52 am
Posts: 12
Iam getting problems when i use native SQL in DB2.

I have the query as select * from employee

and i have the following code...

Code:
Query qry = session.createSQLQuery(qry);

qry.setFirstResult(1);
qry.setMaxResult(5);


When i execute iam getting an exception.

The query generated by SQL Parser is

Code:
select * from (select rownumber() over() as rownumber, * from employee) as temp_ where ronumber <= 5


which obiviously throws an exception, as we cant select column name, * in sql query (you can see that in the parsed subquery).

Thanks,
Thiru


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

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.