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: [JPA] Weird generated native SQL query (pagging)
PostPosted: Fri Dec 18, 2009 6:30 am 
Newbie

Joined: Fri Dec 18, 2009 6:24 am
Posts: 1
Hi,

I am trying to migrate my ejb3 app from JBoss 4.2.3 to JBoss 5.1 using Hibernate 3.3.2 as the JPA provider
I get a strange hibernate related issue when trying to perfrom an native query with JBoss 5.1 :

Code:
String nativeQuery = "select sysdate from dual";
Query query = getEntityManager().createNativeQuery(nativeQuery);


When I execute this code withing JBoss 5.1 I the following SQL code in generated :

Code:
12:09:22,833 INFO [STDOUT] Hibernate: select * from (select sysdate from dual ) where rownum <= ?

In fact all my native query get encapsulated in this pagging template mode. How can I disable this feature in order for my native query to be executed as requested?

Any ideas?

- Patrick


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.