-->
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.  [ 2 posts ] 
Author Message
 Post subject: generate the hbm.xml mapping files from annotated classes
PostPosted: Wed Feb 14, 2007 5:53 am 
Newbie

Joined: Wed Feb 14, 2007 5:38 am
Posts: 6
I want to generate the xml mapping files from annotated entity classes.

I checked hibernate tools, but I was only able to generate the database tables from annotated classes or hbm.xml files and the other way around.

1. Is there a way to generate the hbm.xml mapping files from annotated entity classes?

2. Does anybody know of a tool that can generate EJB3 xml mapping files from annotated EJB3 entities?

Rene


Top
 Profile  
 
 Post subject: Re: generate the hbm.xml mapping files from annotated classe
PostPosted: Wed Feb 14, 2007 6:06 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
vedamen wrote:
I want to generate the xml mapping files from annotated entity classes.

I checked hibernate tools, but I was only able to generate the database tables from annotated classes or hbm.xml files and the other way around.


Everything that hibernate tools can generate from hbm.xml and/or db is also available for annotations.

you just need use an <annotationconfiguration> or <jpaconfiguration> from Ant (or select similar option in eclipse)

Quote:
1. Is there a way to generate the hbm.xml mapping files from annotated entity classes?


Yes - there is no difference on how you would do this from a db, hbm.xml or annotations...just need to start with the right Configuration type and selecte the hbm2hbmxml exporter.

Quote:
2. Does anybody know of a tool that can generate EJB3 xml mapping files from annotated EJB3 entities?


No, but is possible to extend hibernate tools to do that (patches welcome).
do know that orm.xml cannot express all the things that hbm.xml and/or hibernate annotations can map.

_________________
Max
Don't forget to rate


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