Hibernate will auto-import your mappings, so that you can refer to them using their name, rather than their fully qualified name. If you have two mappings with the same name but which are differently qualified, you must add auto-import="false" to the mapping document.
An example would be two mappings:
com.mycompany.x.Message
com.mycompany.y.Message
Autoimport would then have two 'Message' named mappings, and throw the error you've seen.
With autoimport="false", in HQL queries you will have to fully qualify the name of the mapped entity, rather than the short name (user com.mycompany.x.Message rather than Message).
|