Browse Source

Polishing.

Simplify KeyMapper current property/index setup.

Original Pull Request: #3689
pull/3780/head
Christoph Strobl 5 years ago
parent
commit
92a22978c2
  1. 6
      spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/convert/QueryMapper.java

6
spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/convert/QueryMapper.java

@ -1370,10 +1370,9 @@ public class QueryMapper { @@ -1370,10 +1370,9 @@ public class QueryMapper {
MappingContext<? extends MongoPersistentEntity<?>, MongoPersistentProperty> mappingContext) {
this.pathParts = Arrays.asList(key.split("\\."));
this.currentPropertyRoot = pathParts.get(0);
this.currentIndex = 0;
this.iterator = pathParts.iterator();
this.iterator.next();
this.currentPropertyRoot = iterator.next();
this.currentIndex = 0;
}
/**
@ -1385,6 +1384,7 @@ public class QueryMapper { @@ -1385,6 +1384,7 @@ public class QueryMapper {
protected String mapPropertyName(MongoPersistentProperty property) {
StringBuilder mappedName = new StringBuilder(PropertyToFieldNameConverter.INSTANCE.convert(property));
boolean inspect = iterator.hasNext();
while (inspect) {

Loading…
Cancel
Save