-->
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: Dynamic native sql queries
PostPosted: Fri Feb 22, 2008 12:22 pm 
Newbie

Joined: Fri Feb 22, 2008 12:17 pm
Posts: 1
Location: NJ
Does hibernate convert the dynamic native sql queries to prepared statements??
I am aware that named queries will be converted into prepared statements, but is there a way to have dynamic native sql queries converted to prepared statements??


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 22, 2008 7:38 pm 
Expert
Expert

Joined: Mon Nov 26, 2007 2:29 pm
Posts: 443
ash81,

Nothing prevents you from reading your query's text from anywhere, say, with named parameters, and then keep your Query object around in memory to reuse as needed. That is pretty much the definition of a prepared statement, only under another name.

_________________
Gonzalo Díaz


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.