[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - AnnotationConfiguration hacks

msilva do-not-reply at jboss.com
Fri Mar 6 15:06:41 EST 2009


Hi, 

We are working on an annotation extension for hibernate and we have 2 problems:
1. this annotation should be only used on transient properties. However we wouldn't like to force users to use @Transient in addition to ours and we don't know how to do it without the required annotation (@Transient)
2. this annotation indicates that another table will be created and it must be mapped with the metadata information of the property annotated. We don't know how to copy this information to the new table. Example: @lob, @version, @temporal etc.

We thought about 2 approaches for this:
1. We would let the AnnotationConfiguration parse the property including all of its annotations, then we would copy from the Property class the needed information and afterwards we would delete the original configuration.
2. We wouldn't let the AnnotationConfiguration find this property (somehow) but we would use some inner class or method from hibernate-annotation to parse the annotations. Finally, we would use the parsed information on the new table.

Does anybody have a suggestion on how to do it?

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4215848#4215848

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4215848



More information about the jboss-user mailing list