Fix [ 1722057 ] Encrypted columns throw error if saved as null

This commit is contained in:
Carlos Ruiz 2008-02-15 04:29:08 +00:00
parent bc69dfed7e
commit 12ae95b4e8
1 changed files with 9 additions and 2 deletions

View File

@ -2174,8 +2174,15 @@ public abstract class PO
}
else if (value instanceof Timestamp)
sql.append(DB.TO_DATE((Timestamp)encrypt(i,value),p_info.getColumnDisplayType(i) == DisplayType.Date));
else
else {
if (value.toString().length() == 0) {
// [ 1722057 ] Encrypted columns throw error if saved as null
// don't encrypt NULL
sql.append(DB.TO_STRING(value.toString()));
} else {
sql.append(encrypt(i,DB.TO_STRING(value.toString())));
}
}
// Change Log - Only
if (session != null