-->
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: annotationconfiguration use example
PostPosted: Tue Sep 06, 2005 4:57 pm 
Newbie

Joined: Wed May 12, 2004 5:09 pm
Posts: 17
Location: Los Angeles
Hello,

Can anyone please point me to an "Annotationconfiguration for Dummies" guide somewhere?

I'm trying to reverse engineer a table in a database and produce an annotated java file instead of hbm.xml + java.

So I run annotationconfiguration (instead of jdbcconfigutarion) with hbm2java task:

<hibernatetool destdir="...">
<annotationconfiguration configurationfile="hibernate.cfg.xml"/>
<hbm2java/>
</hibernatetool>

Is this the right way of doing this? I do not have hbm!

I know it expects a name of the class and package in hibernate.cfg.xml,
but I need to tell it the name of the table to reverse-engineer in order to create a class.

If it actually expects the class to exist, how am I supposed to create it - with jdbcconfiguration? But then I'd HAVE to create .hbm.xml, which is exactly what I'm trying to avoid.

Thank you in advance for your help!

Egor


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 06, 2005 8:06 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
I dont remember anywere we state that you HAVE to generated hbm when using a jdbcconfiguraiton.

annotationconfiguration you use if you already have something annotated.

to reverse engineer you use <jdbcconfiguration> and then <hbm2java ejb3="true"/>

and its acutally also listed as an example in the docs http://www.hibernate.org/hib_docs/tools ... .html#gen8

_________________
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.