diff --git a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/convert/MappingCassandraConverter.java b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/convert/MappingCassandraConverter.java index ea15e2c03..70e086759 100644 --- a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/convert/MappingCassandraConverter.java +++ b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/convert/MappingCassandraConverter.java @@ -49,7 +49,6 @@ import org.springframework.data.mapping.PersistentPropertyAccessor; import org.springframework.data.mapping.PersistentPropertyPath; import org.springframework.data.mapping.PersistentPropertyPathAccessor; -import org.springframework.data.mapping.PreferredConstructor; import org.springframework.data.mapping.context.MappingContext; import org.springframework.data.mapping.model.ConvertingPropertyAccessor; import org.springframework.data.mapping.model.DefaultSpELExpressionEvaluator; @@ -338,11 +337,11 @@ private R doReadProjection(ConversionContext context, CassandraValueProvider CassandraValueProvider valueProviderToUse = new TranslatingCassandraValueProvider(propertyTranslator, valueProvider); - PreferredConstructor persistenceConstructor = mappedEntity - .getPersistenceConstructor(); + InstanceCreatorMetadata persistenceCreator = mappedEntity + .getInstanceCreatorMetadata(); ParameterValueProvider provider; - if (persistenceConstructor != null && persistenceConstructor.hasParameters()) { + if (persistenceCreator != null && persistenceCreator.hasParameters()) { SpELExpressionEvaluator evaluator = new DefaultSpELExpressionEvaluator(valueProviderToUse.getSource(), spELContext); ParameterValueProvider parameterValueProvider = newParameterValueProvider(context, @@ -508,10 +507,10 @@ private static Class getRawSourceType(CassandraValueProvider valueProvider) { private S doReadEntity(ConversionContext context, CassandraValueProvider valueProvider, CassandraPersistentEntity entity) { - PreferredConstructor persistenceConstructor = entity.getPersistenceConstructor(); + InstanceCreatorMetadata persistenceCreator = entity.getInstanceCreatorMetadata(); ParameterValueProvider provider; - if (persistenceConstructor != null && persistenceConstructor.hasParameters()) { + if (persistenceCreator != null && persistenceCreator.hasParameters()) { SpELExpressionEvaluator evaluator = new DefaultSpELExpressionEvaluator(valueProvider.getSource(), spELContext); ParameterValueProvider parameterValueProvider = newParameterValueProvider(context, entity, valueProvider);