Upgrade to Spring Data Lovelace RC2.
Closes gh-298.
This commit is contained in:
2
pom.xml
2
pom.xml
@@ -21,7 +21,7 @@
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<spring.version>5.1.0.RC2</spring.version>
|
||||
<spring-data-releasetrain.version>Kay-SR9</spring-data-releasetrain.version>
|
||||
<spring-data-releasetrain.version>Lovelace-RC2</spring-data-releasetrain.version>
|
||||
<reactor.version>Californium-RC1</reactor.version>
|
||||
<java.version>1.8</java.version>
|
||||
<project.type>multi</project.type>
|
||||
|
||||
@@ -183,17 +183,20 @@ public class MappingVaultConverter extends AbstractVaultConverter {
|
||||
// make sure id property is set before all other properties
|
||||
Object idValue;
|
||||
|
||||
if (idProperty != null && documentAccessor.hasValue(idProperty)) {
|
||||
if (entity.requiresPropertyPopulation()) {
|
||||
if (idProperty != null && !entity.isConstructorArgument(idProperty)
|
||||
&& documentAccessor.hasValue(idProperty)) {
|
||||
|
||||
idValue = readIdValue(idProperty, documentAccessor);
|
||||
accessor.setProperty(idProperty, idValue);
|
||||
idValue = readIdValue(idProperty, documentAccessor);
|
||||
accessor.setProperty(idProperty, idValue);
|
||||
}
|
||||
|
||||
VaultPropertyValueProvider valueProvider = new VaultPropertyValueProvider(
|
||||
documentAccessor);
|
||||
|
||||
readProperties(entity, accessor, idProperty, documentAccessor, valueProvider);
|
||||
}
|
||||
|
||||
VaultPropertyValueProvider valueProvider = new VaultPropertyValueProvider(
|
||||
documentAccessor);
|
||||
|
||||
readProperties(entity, accessor, idProperty, documentAccessor, valueProvider);
|
||||
|
||||
return instance;
|
||||
}
|
||||
|
||||
|
||||
@@ -20,11 +20,12 @@ import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.data.keyvalue.core.KeyValueOperations;
|
||||
import org.springframework.data.keyvalue.repository.query.KeyValuePartTreeQuery;
|
||||
import org.springframework.data.mapping.context.MappingContext;
|
||||
import org.springframework.data.repository.query.EvaluationContextProvider;
|
||||
import org.springframework.data.repository.query.ParameterAccessor;
|
||||
import org.springframework.data.repository.query.QueryMethod;
|
||||
import org.springframework.data.repository.query.QueryMethodEvaluationContextProvider;
|
||||
import org.springframework.data.repository.query.parser.AbstractQueryCreator;
|
||||
import org.springframework.data.repository.query.parser.PartTree;
|
||||
import org.springframework.data.spel.EvaluationContextProvider;
|
||||
import org.springframework.vault.repository.mapping.VaultPersistentEntity;
|
||||
import org.springframework.vault.repository.mapping.VaultPersistentProperty;
|
||||
|
||||
@@ -48,7 +49,7 @@ public class VaultPartTreeQuery extends KeyValuePartTreeQuery {
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public VaultPartTreeQuery(QueryMethod queryMethod,
|
||||
EvaluationContextProvider evaluationContextProvider,
|
||||
QueryMethodEvaluationContextProvider evaluationContextProvider,
|
||||
KeyValueOperations keyValueOperations,
|
||||
Class<? extends AbstractQueryCreator<?, ?>> queryCreator) {
|
||||
|
||||
|
||||
@@ -27,8 +27,8 @@ import lombok.Value;
|
||||
import org.springframework.dao.InvalidDataAccessApiUsageException;
|
||||
import org.springframework.data.domain.Sort;
|
||||
import org.springframework.data.keyvalue.core.query.KeyValueQuery;
|
||||
import org.springframework.data.mapping.PersistentPropertyPath;
|
||||
import org.springframework.data.mapping.context.MappingContext;
|
||||
import org.springframework.data.mapping.context.PersistentPropertyPath;
|
||||
import org.springframework.data.repository.query.ParameterAccessor;
|
||||
import org.springframework.data.repository.query.parser.AbstractQueryCreator;
|
||||
import org.springframework.data.repository.query.parser.Part;
|
||||
|
||||
Reference in New Issue
Block a user