#1990 - NPE with @Cache and setting naturalKey to null

This commit is contained in:
rob bygrave
2020-04-14 20:57:42 +12:00
parent f06f99dfc3
commit 6d43883f77
3 changed files with 48 additions and 2 deletions
@@ -1399,7 +1399,8 @@ public final class PersistRequestBean<T> extends PersistRequest implements BeanP
changes.put(property.getName(), val);
if (property.isNaturalKey()) {
updateNaturalKey = true;
changeSet.addNaturalKeyPut(beanDescriptor, key, val.toString());
String valStr = (val == null) ? null : val.toString();
changeSet.addNaturalKeyPut(beanDescriptor, key, valStr);
}
}
}