In post
http://forum.hibernate.org/viewtopic.php?t=468, Andrew_SER asked how to centralize his configuration files because he thought that adding 2 classes manually was what was causing his the error "net.sf.hibernate.MappingException: duplicate import" and Gavin told him to read up on imports. (though manually adding them isn't the real cause)
Well, I have 2 classes named the same in different packages and have their mappings imported into hibernate.cfg.xml. I get the "duplicate import" error. Is there any work around besides creating multiple configurations and session factories? It appears to me that this might be the only solution since net.sf.hibernate.cfg.Binder::bindClass adds the import to the mapping with an unqualified class name.
Here's my import statements:
<mapping resource="com/aaaa/objectmodel/Order.hbm.xml"/>
<mapping resource="com/aaaa/bbbb/objectmodel/Order.hbm.xml"/>
I'm using Hibernate 2.0.3.
Is there any (other) way to pull this off?
Thanks,
Cary