-->
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.  [ 3 posts ] 
Author Message
 Post subject: does a native query always use PreparedSatetements?
PostPosted: Fri Jan 25, 2008 1:46 pm 
Senior
Senior

Joined: Mon Jul 24, 2006 8:43 am
Posts: 160
Does a native query i.e. entityManager.createNativeQuery() always use prepared statemend?

regards


Top
 Profile  
 
 Post subject: Re: does a native query always use PreparedSatetements?
PostPosted: Fri Jan 25, 2008 2:09 pm 
Expert
Expert

Joined: Wed Apr 11, 2007 11:39 am
Posts: 735
Location: Montreal, QC
breako wrote:
Does a native query i.e. entityManager.createNativeQuery() always use prepared statemend?

regards


Yes. A native query is a SQLQuery instance and looking at the both uniqueResult and list result will end up calling Loader.doQuery method which uses a PreparedStatement.



Farzad-


Top
 Profile  
 
 Post subject: Re: does a native query always use PreparedSatetements?
PostPosted: Mon Feb 04, 2008 11:28 am 
Senior
Senior

Joined: Mon Jul 24, 2006 8:43 am
Posts: 160
farzad wrote:
breako wrote:
Does a native query i.e. entityManager.createNativeQuery() always use prepared statemend?

regards


Yes. A native query is a SQLQuery instance and looking at the both uniqueResult and list result will end up calling Loader.doQuery method which uses a PreparedStatement.



Farzad-

Thanks for that.


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