This is probably a silly question. But I am hibernatizing a huge app and I have tons of classes, I am organizing them into different hibernate mapping files. However I have come across instances where I have a class mapping in one file but need access to it in another file.
I always get this error:
Quote:
An association from the table blahblahblah refers to an unmapped class error.
If i then put that mapping in the file i have to move others and next thing you know all my mappings are in the same file. I am using spring and when I create my session factory I am doing it with all the files like so:
Code:
<bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="dataSource"><ref local="dataSource"/></property>
<property name="mappingResources">
<list>
<value>file1.hbm.xml</value>
<value>file2.hbm.xml</value>
</list>
I figured that hibernate would be ok with the references but apparently not. Is there a way to do this, i looked in the documentation but didn't see anything?