When the users has both hbm.xml and annotations in his project (most likely doing their migration phase).
I don't get why it needs special attention (besides just take what comes first), but if there is a reason for it then it sounds like hibernate.mappingprecedence would be a better name.
But I don't like this requirment of queuing up all the dom4js to be able to decide it - will just
give us trouble I think. /max
I don't understand what is the problem you are trying to solve? ________________________________ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Emmanuel Bernard Sent: Thursday, 18 August 2005 8:54 PM To: hibernate-devel@lists.sourceforge.net Subject: [Hibernate] Configuration artifact precedence Artifacts (ie hbm files and annotated classes) were not able to point to the same entity-name (== class name for annotations) in an AnnotationConfiguration object: a duplicate mapping exception were raised. I've added an hibernate.artifact property (we need to find a good name), to allow precedence from one artifact over an other. hibernate.artifact hbm, class (default) will prioritize hbm files over annotated classes for the same entity-name. hibernate.artifact class, hbm will prioritize annotated classes over hbm files for the same entity-name. hibernate.artifact class will ignore any hbm file passed to AnnotationConfiguration This is a much more powerful version of hibernate.archive (slightly diff semantic but same final goal, I'll remove hibernate.archive). There are a limitation though, you cannot mix annotated classes and hbm files in a mapped class hierarchy. I'll add ejb3xml when implemented. I think this concept might come to Hibernate core at some point (at least the infrastructure code). But the drawback is that I need to delay all the binding operation till the actual buildSessionFactory() launch, and thus keeping a list of classes and Document to be processed. This consumes more memory (higher peak until the buildSessionFactory call), but its probably not a show stopper. Well, just to let you know and to help me to find a good configuration property name.
------------------------------------------------------- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf _______________________________________________ hibernate-devel mailing list hibernate-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/hibernate-devel