Max Rydahl Andersen wrote:
why not just:
<mapping package="my.package"/>
To be consistent, see below.
<mapping class="my.package.MyClass"/>
-1 it breaks the actual semantic and prevents you from using cfg.xml on annotated classes (you can switch afterall)
What does addPackage actually do ? Add package-level annotations such as.. ?
Add package-info.class It is used for id generator declarations and probably queries soon.
... and *not* to add hard dependency from core to annotations. I can add a weak dependency getting AnnotationConfiguration through its string name and catching the ClassNotFoundException if AnnotationConfiguration is requested.
And what class should do this ? Can't see this...please explain ,)
Ok, after looking at it. AnnotationConfiguration will override parseSessionFactory() and add the needed features before delegating to the super implementation. So no dependency to the core except for the DTD enhancement.
------------------------------------------------------- The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt _______________________________________________ hibernate-devel mailing list hibernate-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/hibernate-devel