I have two classes with the same name in two different packages:
Code:
com.company.product.news.User.java
and
com.company.product.cinema.User.java
and in the hibernate configuration file I have:
Code:
<hibernate-configuration>
<!-- Mapping files -->
<mapping resource="com/company/product/news/User.hbm.xml"/>
<mapping resource="com/company/product/cinema/User.hbm.xml"/>
Hibernate fails to initialize with this, complaining about duplicate
Code:
User
:
net.sf.hibernate.MappingException: duplicate import: User
at net.sf.hibernate.cfg.Mappings.addImport(Mappings.java:85)
at net.sf.hibernate.cfg.Binder.bindClass(Binder.java:126)
I am using Hibernate version 2.
In mapping files, I have the
Code:
class
attributes set to correct package names.
Is there a way around this?
Thanks,
Cagan