-->
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 MYSQL table from .hbm file
PostPosted: Fri Oct 10, 2008 2:33 pm 
Newbie

Joined: Thu Jul 31, 2008 5:33 am
Posts: 5
HI

I am using HIbernate 3,I have a .hbm file,Please explain how to create mysql table from .hbm file ,is there any eclipse plugin or tool available?


Top
 Profile  
 
 Post subject: Re: generate MYSQL table from .hbm file
PostPosted: Fri Oct 10, 2008 4:56 pm 
Newbie

Joined: Thu Oct 09, 2008 8:51 pm
Posts: 2
You might want to take a look at this property …
<property name="hibernate.hbm2ddl.auto" value="create-drop"/>

You can set value to different actions. This thing is when it is set, it does it every time. For example if it is set to the above, it will drop and create the table every time. This is why I have a thread on is there a way to have Hibernate alter tables so as not to loose data on a schema change.

Of course when it is dropped, you loose data. Also I think you can set it and all config settings via code.

Although not specific to your topic you might gleam some information from here.
http://www.jroller.com/eyallupu/entry/h ... m2ddl_tool

_________________
Thanks,
PE


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.