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 e480ceb2b7
commit 323ec3f1d6

View File

@@ -1282,10 +1282,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;
}
/**
@@ -1297,6 +1296,7 @@ public class QueryMapper {
protected String mapPropertyName(MongoPersistentProperty property) {
StringBuilder mappedName = new StringBuilder(PropertyToFieldNameConverter.INSTANCE.convert(property));
boolean inspect = iterator.hasNext();
while (inspect) {