DATACMNS-1743 - Fixed handling of failed aggregate lookup in DomainClassConverter.

We now fall back to null in case the repository lookup for the aggregate results in an absent value rather than returning the source unconverted.
This commit is contained in:
Oliver Drotbohm
2020-06-16 11:48:59 +02:00
committed by Oliver Drotbohm
parent f65451d777
commit aa1c1d4f15
2 changed files with 19 additions and 1 deletions

View File

@@ -82,7 +82,7 @@ public class DomainClassConverter<T extends ConversionService & ConverterRegistr
@Nullable
@Override
public Object convert(@Nullable Object source, TypeDescriptor sourceType, TypeDescriptor targetType) {
return getConverter(targetType).map(it -> it.convert(source, sourceType, targetType)).orElse(source);
return getConverter(targetType).map(it -> it.convert(source, sourceType, targetType)).orElse(null);
}
/*