-->
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: Dynamically reload a <sql-query> mapping
PostPosted: Mon Apr 04, 2005 11:54 am 
Newbie

Joined: Wed Mar 30, 2005 6:50 pm
Posts: 8
Is there a way to dynamically reload a named sql query that is defined in a hibernate mapping file? I have tried closing and clearing out the session factory and creating a new one based on the new mapping files, but it still seems to store the named query in the cache somewhere. The debug statements seem to indicate that it is reloading the configuration files but for some reason it does not appear to. The only way I can clear this mapping is to stop and start Tomcat.

[b]Hibernate version: 3.0[/b]

[b]Mapping documents:[/b]
<hibernate-mapping>
<sql-query name="myTestQuery">
<return-scalar column="TASKTEXT" type="string"/>
<return-scalar column="STARTDATE" type="date"/>
<return-scalar column="ENDDATE" type="date"/>
select task.TASKTEXT, ti.STARTDATE, ti.ENDDATE
from TASK task, TASKINSTANCE ti, TASKOWNER owner
where ti.TASK = task.TASKID
and owner.TASKINSTANCEID = ti.TASKINSTANCEID
</sql-query>
</hibernate-mapping>

[b]Name and version of the database you are using: SQL Server 2000[/b]


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 04, 2005 5:01 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
if you are loading this via a resource it might be some old classloader that is hanging around.

i promise you that a new Configuration will reread and not cache anythhing.

_________________
Max
Don't forget to rate


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.