-->
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: Modifying a business object after table is created
PostPosted: Mon Dec 03, 2007 7:01 pm 
Newbie

Joined: Mon Dec 03, 2007 6:54 pm
Posts: 7
Suppose you add an extra property to your business object - does NHibernate handle adding the extra column in the database?

Is there an accepted way of handling this? Assume the table had existing data.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 03, 2007 11:52 pm 
Expert
Expert

Joined: Fri May 13, 2005 11:13 am
Posts: 292
Location: Rochester, NY
This is not handled by NH. DON'T use hbm2ddl, it will build a table from scratch, but will attempt to drop the tables before issuing a create. It doesn't modify the existing table.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 04, 2007 12:47 am 
Newbie

Joined: Mon Dec 03, 2007 6:54 pm
Posts: 7
Ok understood. Is the convention to manually update the table?


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.