-->
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.  [ 5 posts ] 
Author Message
 Post subject: Create Classes from Hibernate
PostPosted: Mon Jan 02, 2006 8:18 am 
Beginner
Beginner

Joined: Mon Dec 26, 2005 4:55 pm
Posts: 28
I am trying to develop a pluginable application and at the same time using hibernate. Needless to say I am still doing scatched of how the applications should work (since I have only started hibernate a few weeks ago).

My question; Is there a way to create a table inside the database according to the hibernate hbm.xml document?

I tried to do some search on google, but could not find much. I know that thre are third party toold that can create the database schema from the classes! but could I do this withing my application itself?

regards,
sim085


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 02, 2006 9:32 am 
Senior
Senior

Joined: Tue Aug 23, 2005 8:52 am
Posts: 181
Lookup hbm2ddl in the Hibernate docs for loading a schema from a HBM document. There are ant tasks available that do this task.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 02, 2006 10:44 am 
Beginner
Beginner

Joined: Mon Dec 26, 2005 4:55 pm
Posts: 28
thanks for the reply :) I will definitly check that altough do not think I can use the ant task.

btw - a better title for this is " Hpw tp create Database Tables from Classes"

Sorry for the wrong title .. just had a very big headache when was writing my first post!

regards,
sim085


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 02, 2006 12:51 pm 
Senior
Senior

Joined: Tue Aug 23, 2005 8:52 am
Posts: 181
The ant task is only a wrapper over the actual class(SchemaExport) that does the actual work of creating the DDLs.
If you are looking to get more information about the Classes/Tables from the HBM , you can look up the metadata classes in the
org.hibernate.metadata package


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 03, 2006 4:30 am 
Beginner
Beginner

Joined: Mon Dec 26, 2005 4:55 pm
Posts: 28
Thanks rajasaur,

I will definitly go checking the package you mentioned :)

regards,
sim085


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