-->
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.  [ 9 posts ] 
Author Message
 Post subject: Migration to Annotations from XDoclet
PostPosted: Fri Mar 04, 2005 1:07 pm 
Pro
Pro

Joined: Tue Aug 26, 2003 1:24 pm
Posts: 213
Location: Richardson, TX
Is there going to be a migration tool for converting XDoclet tags to annotations? Also, if I start developing using XDoclet tags now (I can't start using annotations for various reasons) are there any problems one could easily anticipate in the conversion?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 04, 2005 3:29 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
We do not plan to do so.

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 04, 2005 4:02 pm 
Pro
Pro

Joined: Tue Aug 26, 2003 1:24 pm
Posts: 213
Location: Richardson, TX
Would such a tool be useful to the community?


Top
 Profile  
 
 Post subject:
PostPosted: Sat Mar 05, 2005 12:26 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
well - at some point the new toolset would be able to this based on the hbm.xml the xdoclet dumps out.....anyone interested in that should come around and help us with completing the various exporters we have.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 23, 2005 12:58 pm 
Newbie

Joined: Fri Mar 26, 2004 8:41 am
Posts: 9
What about a tool to compare the Configuration generated from annotations to the one created from *.hbm.xml?
This would allow to check that nothing has been altered/lost by using anotations in place of config files


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 23, 2005 1:27 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
what would such a tool do/look like ?

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 23, 2005 2:53 pm 
Newbie

Joined: Fri Mar 26, 2004 8:41 am
Posts: 9
Very basically it could be overriding equals on Configuration. This would allow something like:

Code:
final Configuration oldConf = new Configuration().configure("hibernateOld.cfg.xml");

final AnnotationConfiguration newConf = (AnnotationConfiguration) new AnnotationConfiguration().configure();

assertEquals(oldConf, newConf);


This would be really basic and would not give any helpfull information when old and new configurations differs. Ideally a diff method taking 2 Configuration as parameters should say where the diferences are. A way to achieve that and give good human readable information could be to generate *.hbm.xml from the configuration. Users could then use their prefered diff tool.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 23, 2005 2:59 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
You can generate a hbm.xml from a Configuration today - that is how the tools works. They dump the Configuration to various representations.

The tool that creates a hbm.xml is <hbm2hbmxml> and the Configuration can be provided via a <jdbcconfiguration>, <annotaitonconfiguraiton> or an "ordinary" <configuration>.

It is not 100% complete, so if you find something missing then please report it or even better provide a patch for it.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 23, 2005 5:25 pm 
Newbie

Joined: Fri Mar 26, 2004 8:41 am
Posts: 9
That's great! I was looking for something in the Annotation area and missed this one. Thanks.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 9 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.