Polishing.

Simplify KeyMapper current property/index setup.

Original Pull Request: #3689
This commit is contained in:
Christoph Strobl
2021-07-05 10:28:39 +02:00
parent 2e2e076b5b
commit 92a22978c2
@@ -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 {
protected String mapPropertyName(MongoPersistentProperty property) {
StringBuilder mappedName = new StringBuilder(PropertyToFieldNameConverter.INSTANCE.convert(property));
boolean inspect = iterator.hasNext();
while (inspect) {