Fantastic :) Hey, can you show us an example of an annotated class?
Emmanuel Bernard wrote:
After been convinced by Max, I've commited it into HibernateExt/metadata (HEAD)
To build it :
- use the JDK 1.5
- build an hibernate2.2 dist in the dir containing HibernateExt
Usually
|- Hibernate2 (taken from CVS - v22branch)
|- HibernateExt (taken from CVS - HEAD)
|- hibernate-2.2 (build using ant dist in Hibernate2)
- launch 'ant dist' in HibernateExt/metadata
- get the distribution into HibernateExt/metadata/target
It is not embedded in the HibernateExt build.xml hat for now.
You can map: - a simple class - it's id (no composite) - it's generator - it's version or timestamp - it's properties (I have not tryed multiple columns but it should work) - on it's attributes (field access) or on it's getters (property access) - it's class level cache usage - programmatically
You cannot map:
- any king of association between classes
- composite id or any knid of component
- subclass or joined-subclass
- an annotation on a superclass property
- a custom PropertyAccessor
- lots of other stuffs
- using hibernate.properties or hibernate.cfg.xml to declare the resources.
I have not tested every single annotation data set right now. I plan to improve (could say do) the test part.
Don't launch CheckStyle, you'll face early abort due to JDK 1.5 syntax.
How to use it
Put Hibernate2.jar (2.2), hibernate-metadata.jar, and third party libs in your CP.
Use JDK 1.5
Use AnnotationConfiguration instead of Comfiguration and do myAnnotationConfiguration.addAnnotedClass(AnnotedClass.class)
There is a specific TestCase class that shows that.
Enjoy
Useful biblio http://www.jcp.org/aboutJava/communityprocess/review/jsr175/ Hibernate DTD
-- Gavin King +61 410534454
Hibernate [EMAIL PROTECTED] http://hibernate.org
JBoss Inc [EMAIL PROTECTED] http://jboss.com
------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click _______________________________________________ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel