Fix when json/jackson bean inserted as null and not changed

Expectation is that it is not included in update (still null, no change)
This commit is contained in:
rbygrave
2021-07-30 17:16:05 +12:00
parent ea741d0169
commit ca1636ff9e
2 changed files with 28 additions and 0 deletions
@@ -57,6 +57,9 @@ public class BeanPropertyJsonMapper extends BeanProperty {
final String json = scalarType.format(value);
final MutableValueInfo oldHash = ebi.mutableInfo(propertyIndex);
if (oldHash == null) {
if (value == null) {
return false; // no change, still null
}
ebi.mutableNext(propertyIndex, next(json));
return true;
}