I'm trying to use an Auxillary database-object, see, http://docs.jboss.org/hibernate/core...atabase-object to alter some foreign keys, however it is never executed (even if I implement my own). I've tried stepping through the code, & I can see the mapping file is read, but there is nothing that runs the aux code.
Here is my setup:
Hibernate Annotations 3.4.0.GA
Session Factory bean def:
<bean id="sessionFactory" class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean"
<property name="dataSource" ref="dataSource" />
<property name="hibernateProperties" ref="hibernateProperties" />
<property name="annotatedClasses" ref="annotatedClasses" />
<property name="mappingResources" value="Event.hbm.xml" />
Can anybody help please???
alter table event drop constraint FK_ASSET;
alter table event add constraint FK_ASSET foreign key ('asset_id') references asset('id') on delete set null;
Thanks in advance,