-->
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: Change Named Queries in Runtime
PostPosted: Sat May 07, 2011 6:09 am 
Newbie

Joined: Fri Jan 11, 2008 3:25 pm
Posts: 7
Hello,

I have a problem, I use Spring and JPA in my application and I have named queries in orm.xml. I need to change some named queries in runtime or change SQL generates for Hibernate.

Any suggestion??

Thank you in advance


Top
 Profile  
 
 Post subject: Re: Change Named Queries in Runtime
PostPosted: Sun May 08, 2011 8:42 pm 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
to change the SQL you can either extend the dialect or define the full SQL query by using namedSQLQueries instead of named HQL queries.
You can't change named queries after the SessionFactory is started, that defeats the purpose of naming them.

_________________
Sanne
http://in.relation.to/


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.