I want to keep 2 config files as i have 2 database systems to work with.
The classes of mapping files in hb1.cfg.xml are referring to the classes in hb2.cfg.xml as they have many to one relationship between them.
But in session factory i can configure only one xx.cfg.xml file. It results into org.hibernate.MappingException: An association from the table XXX refers to an unmapped class: YYY.
Any idea how to resolve it.
------------------------------------------ Mapping file in hb1.cfg.xml
<?xml version="1.0"?> <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">