-->
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: Adding new column to existibg table
PostPosted: Tue May 06, 2008 7:26 am 
Newbie

Joined: Tue May 06, 2008 6:27 am
Posts: 2
Hi every one,

I am new to hibernate, need help to add new column to the existing table.

In my project i am using HSQLDB database. i am using hibernate to deal with the database. now i need to add new column to one of the existing table. can anyone help me how to do this by using hibernate. what changes i need to do for the .hbm file and the configuration file.

Please help me to do this.

Thanks in advance
Bhaskar Reddy


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 07, 2008 11:15 am 
Senior
Senior

Joined: Fri Jun 01, 2007 12:41 pm
Posts: 121
Add the new column entry to hbm file and execute schemaupdate task. It will alter the existing table to insert new column.


Top
 Profile  
 
 Post subject: Thanks
PostPosted: Thu May 08, 2008 1:16 am 
Newbie

Joined: Tue May 06, 2008 6:27 am
Posts: 2
Hi sjhyam,

Thank you very much for your help. how can i execute the schema update. you mean i need to execute the alter query on the table. please give some details on this.

Thanks
Bhaskar


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 08, 2008 11:44 am 
Newbie

Joined: Wed May 07, 2008 6:21 pm
Posts: 6
Location: Lakewood, CO
A good write up on this topic:
http://www.alittlemadness.com/?p=43


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.