-->
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.  [ 3 posts ] 
Author Message
 Post subject: Newbie Question: Automatic creation of tables / colums ?
PostPosted: Thu Mar 15, 2007 8:04 am 
Newbie

Joined: Sat Feb 17, 2007 1:54 pm
Posts: 2
Hello all,

I just wondering about that Hibernate is complaining that the table, I specified in the .hbm.xml file is not present in my schema. Should it not create automatigally? Whats about colums? When I add to my bean a new property and I update the .hbm.xml file should hibernate not update the db table to add/delete a new column?

It seems the default is to do it not... how can I change this?

Thanks,

SA.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 15, 2007 9:25 am 
Expert
Expert

Joined: Tue Jul 11, 2006 10:21 am
Posts: 457
Location: Columbus, Ohio
Set the hibernate.hbm2ddl.auto property in your configuration file. See table 3.7 in the link below.

http://www.hibernate.org/hib_docs/v3/re ... n-optional


Top
 Profile  
 
 Post subject: set it in the config file
PostPosted: Tue Mar 20, 2007 8:08 am 
Newbie

Joined: Wed Feb 28, 2007 3:37 am
Posts: 3
Location: India
<prop key="hibernate.hbm2ddl.auto">update</prop>
set the hibernate.hbm2ddl.auto to update.

_________________
M.Sridhar Reddy


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