-
1. Re: add new column to a CMP in jboss 3.2.5
pouncilt Feb 11, 2005 10:48 AM (in response to caesarkim)You can add this column one of two ways:
The first is to go in and manually alter the table and add the new column.
You will not be able to test to see if you EJB actually created the correct
table with all of the right columns through JBoss.
The second way is to drop the table and then redeploy. The easiest ways, if
you are still in the development phase, is to drop the entire database and
then create the database and then do a fresh deploy, thus letting JBoss
create all of the tables for you.
Hope this helps!
Tonte -
2. Re: add new column to a CMP in jboss 3.2.5
caesarkim Feb 11, 2005 7:17 PM (in response to caesarkim)If I alter the table manually and match fields from CMP with columns from a table, then will I be able to insert data and select without any problem?
cuz I don't like the second solution dropping the table. I don't want to lose all data. It is going to impact the production. I don't want to redeploy all tables. I want to redeploy only a specific CMP when necessary without losing data. thanks for reply anyway.
any other ideas? -
3. Re: add new column to a CMP in jboss 3.2.5
triathlon98 Feb 12, 2005 11:50 AM (in response to caesarkim)To do automatica databse table udate, see
http://www.jboss.org/wiki/Wiki.jsp?page=AutomaticDatabaseStructureUpdate
Joachim