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.  [ 4 posts ] 
Author Message
 Post subject: is there any Ant task to export schema from annotated class?
PostPosted: Fri Nov 17, 2006 7:35 pm 
Newbie

Joined: Fri Nov 17, 2006 7:24 pm
Posts: 16
Hi
thank you for reading my post
I am reading Pro Hibernate 3.0 and i have many problems as it seems many of annotation stuff changed between version 3.0 and 3.2, by the way
in that book i read that hibernate can not generate an schema from annotated class, is it correct?
it said that it can export schema from mapping files and not annotation.

now that it is hibernate 3.2, can it export an schema from annotated classes?
if yes, how i can do it?

thanks


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 17, 2006 7:54 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
Pro Hibernate 3.0 is wrong on this point (and many others)

It has always been possible programmatically.

And for a long time we have had the tool support for in hibernate tools.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 17, 2006 8:04 pm 
Newbie

Joined: Fri Nov 17, 2006 7:24 pm
Posts: 16
Thanks
is there any ant task for it?
I mean ANT task similar to org.hibernate.tool.hbm2ddl.SchemaExport which i can use in ant build file to automate the Schema creation?

as you said Pro hibernate 3 has problem, i want to ask which book i should read ?
I want a book that cover hibernate 3.2 or at least i could compile its code with no problems.

thanks


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 17, 2006 8:11 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
http://blog.hibernate.org/cgi-bin/blosx ... #jpwhebook

and yes we have an ant task, did you try and read the docs for tools.hibernate.org ? :)

Code:
<hibernatetool destdir=“src”>
<annotationconfiguration
   configurationfile=“hibernate.cfg.xml”/>
<hbm2ddl/>
</hibernatetool>

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