@@ -889,10 +889,14 @@ static class PositionParameterRetainingPropertyKeyConverter implements Converter
889
889
890
890
private final KeyMapper keyMapper ;
891
891
892
- PositionParameterRetainingPropertyKeyConverter (String rawKey ) {
892
+ public PositionParameterRetainingPropertyKeyConverter (String rawKey ) {
893
893
this .keyMapper = new KeyMapper (rawKey );
894
894
}
895
895
896
+ /*
897
+ * (non-Javadoc)
898
+ * @see org.springframework.core.convert.converter.Converter#convert(java.lang.Object)
899
+ */
896
900
@ Override
897
901
public String convert (MongoPersistentProperty source ) {
898
902
return keyMapper .mapPropertyName (source );
@@ -926,7 +930,7 @@ public TypeInformation<?> getTypeHint() {
926
930
*/
927
931
static class KeyMapper {
928
932
929
- Iterator <String > iterator ;
933
+ private final Iterator <String > iterator ;
930
934
931
935
public KeyMapper (String key ) {
932
936
@@ -943,14 +947,13 @@ public KeyMapper(String key) {
943
947
protected String mapPropertyName (MongoPersistentProperty property ) {
944
948
945
949
String mappedName = PropertyToFieldNameConverter .INSTANCE .convert (property );
946
-
947
950
boolean inspect = iterator .hasNext ();
951
+
948
952
while (inspect ) {
949
953
950
954
String partial = iterator .next ();
955
+ boolean isPositional = (isPositionalParameter (partial ) && (property .isMap () || property .isCollectionLike ()));
951
956
952
- boolean isPositional = (isPositionalParameter (partial ) && (property .isMap () || property .isCollectionLike () || property
953
- .isArray ()));
954
957
if (isPositional ) {
955
958
mappedName += "." + partial ;
956
959
}
@@ -961,7 +964,7 @@ protected String mapPropertyName(MongoPersistentProperty property) {
961
964
return mappedName ;
962
965
}
963
966
964
- boolean isPositionalParameter (String partial ) {
967
+ private static boolean isPositionalParameter (String partial ) {
965
968
966
969
if (partial .equals ("$" )) {
967
970
return true ;
@@ -975,7 +978,6 @@ boolean isPositionalParameter(String partial) {
975
978
}
976
979
}
977
980
}
978
-
979
981
}
980
982
981
983
/**
0 commit comments