Don't synchronize column with database by default, synchronize only if you mark column as getIsSyncDatabase='Y'

This commit is contained in:
Carlos Ruiz 2007-05-15 20:03:23 +00:00
parent d0f4cae6e6
commit fc4b40d2bc
1 changed files with 9 additions and 4 deletions

View File

@ -1339,10 +1339,7 @@ public class PackInHandler extends DefaultHandler {
|| m_Column.is_ValueChanged("ColumnName")
|| m_Column.is_ValueChanged("IsMandatory")
);
// Don't create database column for virtual columns
if (m_Column.isVirtualColumn())
recreateColumn = false;
// changed default ??
// m_Column.is_ValueChanged("DefaultValue") doesn't work well with nulls
if (! recreateColumn) {
@ -1361,6 +1358,14 @@ public class PackInHandler extends DefaultHandler {
}
}
// Don't create database column for virtual columns
// Don't create columns by default, just if getIsSyncDatabase='Y'
if (recreateColumn) {
String sync = atts.getValue("getIsSyncDatabase");
if (m_Column.isVirtualColumn() || sync == null || (!sync.equals("Y")))
recreateColumn = false;
}
if (m_Column.save(m_trxName) == true){
record_log (1, m_Column.getName(),"Column", m_Column.get_ID(),AD_Backup_ID, Object_Status,"AD_Column",get_IDWithColumn("AD_Table", "TableName", "AD_Column"));
} else {