@@ -879,10 +879,14 @@ static class PositionParameterRetainingPropertyKeyConverter implements Converter
879
879
880
880
private final KeyMapper keyMapper ;
881
881
882
- PositionParameterRetainingPropertyKeyConverter (String rawKey ) {
882
+ public PositionParameterRetainingPropertyKeyConverter (String rawKey ) {
883
883
this .keyMapper = new KeyMapper (rawKey );
884
884
}
885
885
886
+ /*
887
+ * (non-Javadoc)
888
+ * @see org.springframework.core.convert.converter.Converter#convert(java.lang.Object)
889
+ */
886
890
@ Override
887
891
public String convert (MongoPersistentProperty source ) {
888
892
return keyMapper .mapPropertyName (source );
@@ -916,7 +920,7 @@ public TypeInformation<?> getTypeHint() {
916
920
*/
917
921
static class KeyMapper {
918
922
919
- Iterator <String > iterator ;
923
+ private final Iterator <String > iterator ;
920
924
921
925
public KeyMapper (String key ) {
922
926
@@ -933,14 +937,13 @@ public KeyMapper(String key) {
933
937
protected String mapPropertyName (MongoPersistentProperty property ) {
934
938
935
939
String mappedName = PropertyToFieldNameConverter .INSTANCE .convert (property );
936
-
937
940
boolean inspect = iterator .hasNext ();
941
+
938
942
while (inspect ) {
939
943
940
944
String partial = iterator .next ();
945
+ boolean isPositional = (isPositionalParameter (partial ) && (property .isMap () || property .isCollectionLike ()));
941
946
942
- boolean isPositional = (isPositionalParameter (partial ) && (property .isMap () || property .isCollectionLike () || property
943
- .isArray ()));
944
947
if (isPositional ) {
945
948
mappedName += "." + partial ;
946
949
}
@@ -951,7 +954,7 @@ protected String mapPropertyName(MongoPersistentProperty property) {
951
954
return mappedName ;
952
955
}
953
956
954
- boolean isPositionalParameter (String partial ) {
957
+ private static boolean isPositionalParameter (String partial ) {
955
958
956
959
if (partial .equals ("$" )) {
957
960
return true ;
@@ -965,7 +968,6 @@ boolean isPositionalParameter(String partial) {
965
968
}
966
969
}
967
970
}
968
-
969
971
}
970
972
971
973
/**
0 commit comments