Fix [ 1955264 ] Changing columns is updating fields needlessly
This commit is contained in:
parent
d0036eff0e
commit
0165e4d540
|
@ -256,14 +256,19 @@ public class MColumn extends X_AD_Column
|
||||||
// Update Fields
|
// Update Fields
|
||||||
if (!newRecord)
|
if (!newRecord)
|
||||||
{
|
{
|
||||||
StringBuffer sql = new StringBuffer("UPDATE AD_Field SET Name=")
|
if ( is_ValueChanged(MColumn.COLUMNNAME_Name)
|
||||||
.append(DB.TO_STRING(getName()))
|
|| is_ValueChanged(MColumn.COLUMNNAME_Description)
|
||||||
.append(", Description=").append(DB.TO_STRING(getDescription()))
|
|| is_ValueChanged(MColumn.COLUMNNAME_Help)
|
||||||
.append(", Help=").append(DB.TO_STRING(getHelp()))
|
) {
|
||||||
.append(" WHERE AD_Column_ID=").append(get_ID())
|
StringBuffer sql = new StringBuffer("UPDATE AD_Field SET Name=")
|
||||||
.append(" AND IsCentrallyMaintained='Y'");
|
.append(DB.TO_STRING(getName()))
|
||||||
int no = DB.executeUpdate(sql.toString(), get_TrxName());
|
.append(", Description=").append(DB.TO_STRING(getDescription()))
|
||||||
log.fine("afterSave - Fields updated #" + no);
|
.append(", Help=").append(DB.TO_STRING(getHelp()))
|
||||||
|
.append(" WHERE AD_Column_ID=").append(get_ID())
|
||||||
|
.append(" AND IsCentrallyMaintained='Y'");
|
||||||
|
int no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
|
log.fine("afterSave - Fields updated #" + no);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return success;
|
return success;
|
||||||
} // afterSave
|
} // afterSave
|
||||||
|
|
Loading…
Reference in New Issue