// Null out the key and owner fields if they are nullable
if (keyMapping.isNullable())
{
PersistenceCapable pcOldValue = (PersistenceCapable)oldValue;
StateManager vsm = om.findStateManager(pcOldValue);
// Null the key field
vsm.setObjectField(pcOldValue, keyFieldNumber, key, null);
vsm.replaceField(keyFieldNumber, null, true);