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]
|