#2249 - Bug with DbJson Jackson property that is null is updated as null (unnecessarily included in update)

When the value is null and not changed then is was null before and should not be treated as dirty. Hence only check for dirty when value != null in BeanDescriptor 3182
This commit is contained in:
rbygrave
2021-06-11 00:19:20 +12:00
parent 6fd2f556db
commit 884dd939b7
2 changed files with 2 additions and 2 deletions
@@ -3179,7 +3179,7 @@ public class BeanDescriptor<T> implements BeanType<T>, STreeType {
int propertyIndex = beanProperty.getPropertyIndex();
if (!ebi.isDirtyProperty(propertyIndex) && ebi.isLoadedProperty(propertyIndex)) {
Object value = beanProperty.getValue(ebi.getOwner());
if (value == null || beanProperty.isDirtyValue(value)) {
if (value != null && beanProperty.isDirtyValue(value)) {
// mutable scalar value which is considered dirty so mark
// it as such so that it is included in an update
ebi.markPropertyAsChanged(propertyIndex);