Fix [ 1955264 ] Changing columns is updating fields needlessly

This commit is contained in:
Carlos Ruiz 2008-05-01 05:41:20 +00:00
parent d0036eff0e
commit 0165e4d540
1 changed files with 13 additions and 8 deletions

View File

@ -256,6 +256,10 @@ public class MColumn extends X_AD_Column
// Update Fields
if (!newRecord)
{
if ( is_ValueChanged(MColumn.COLUMNNAME_Name)
|| is_ValueChanged(MColumn.COLUMNNAME_Description)
|| is_ValueChanged(MColumn.COLUMNNAME_Help)
) {
StringBuffer sql = new StringBuffer("UPDATE AD_Field SET Name=")
.append(DB.TO_STRING(getName()))
.append(", Description=").append(DB.TO_STRING(getDescription()))
@ -265,6 +269,7 @@ public class MColumn extends X_AD_Column
int no = DB.executeUpdate(sql.toString(), get_TrxName());
log.fine("afterSave - Fields updated #" + no);
}
}
return success;
} // afterSave