-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: mapping file error
PostPosted: Fri Jun 10, 2005 12:22 am 
Beginner
Beginner

Joined: Thu Jun 09, 2005 3:18 am
Posts: 34
Location: India
Could not compile the mapping document
net.sf.hibernate.MappingException: duplicate import: Message


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jun 10, 2005 5:37 am 
Regular
Regular

Joined: Wed Feb 02, 2005 6:33 am
Posts: 70
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).


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.