diff --git a/spring-data-relational/src/main/java/org/springframework/data/relational/core/conversion/MappingRelationalConverter.java b/spring-data-relational/src/main/java/org/springframework/data/relational/core/conversion/MappingRelationalConverter.java index 60e5e64c1..63f3bf5f8 100644 --- a/spring-data-relational/src/main/java/org/springframework/data/relational/core/conversion/MappingRelationalConverter.java +++ b/spring-data-relational/src/main/java/org/springframework/data/relational/core/conversion/MappingRelationalConverter.java @@ -44,7 +44,16 @@ import org.springframework.data.mapping.PersistentProperty; import org.springframework.data.mapping.PersistentPropertyAccessor; import org.springframework.data.mapping.PersistentPropertyPathAccessor; import org.springframework.data.mapping.context.MappingContext; -import org.springframework.data.mapping.model.*; +import org.springframework.data.mapping.model.CachingValueExpressionEvaluatorFactory; +import org.springframework.data.mapping.model.ConvertingPropertyAccessor; +import org.springframework.data.mapping.model.EntityInstantiator; +import org.springframework.data.mapping.model.ParameterValueProvider; +import org.springframework.data.mapping.model.PersistentEntityParameterValueProvider; +import org.springframework.data.mapping.model.PropertyValueProvider; +import org.springframework.data.mapping.model.SimpleTypeHolder; +import org.springframework.data.mapping.model.SpELContext; +import org.springframework.data.mapping.model.ValueExpressionEvaluator; +import org.springframework.data.mapping.model.ValueExpressionParameterValueProvider; import org.springframework.data.projection.EntityProjection; import org.springframework.data.projection.EntityProjectionIntrospector; import org.springframework.data.projection.EntityProjectionIntrospector.ProjectionPredicate; @@ -784,16 +793,18 @@ public class MappingRelationalConverter extends AbstractRelationalConverter Class targetComponentType = mapped.get(0).getClass(); targetType = Array.newInstance(targetComponentType, 0).getClass(); } + return getConversionService().convert(mapped, targetType); } /** - * Unwraps technology specific wrappers. Custom conversions may choose to return a wrapper class that contains additional information for the technology driver. - * These wrappers can't be used as members of a collection, therefore we may have to unwrap the values. - * - * This method allows technology specific implemenations to provide such an unwrapping mechanism. + * Unwraps technology-specific wrappers. Custom conversions may choose to return a wrapper class that contains + * additional information for the driver. These wrappers can't be used as members of a collection, therefore we may + * have to unwrap the values. This method allows technology-specific implementations to provide such an unwrapping + * mechanism. * * @param convertedValue a value that might need unwrapping. + * @since 4.0 */ @Nullable protected Object unwrap(@Nullable Object convertedValue) {