Skip to content

Commit 5cf190c

Browse files
Allowing sort for GSI hash and range key criteria if the index hash key criteria is equals
1 parent 8dd78db commit 5cf190c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/org/socialsignin/spring/data/dynamodb/repository/query/AbstractDynamoDBQueryCriteria.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ protected void applySortIfSpecified(QueryRequest queryRequest, List<String> perm
150150
throw new UnsupportedOperationException("Sorting by multiple attributes not possible");
151151

152152
}
153-
if (queryRequest.getKeyConditions().size() > 1) {
153+
if (queryRequest.getKeyConditions().size() > 1 && !hasIndexHashKeyEqualCondition()) {
154154
throw new UnsupportedOperationException(
155155
"Sorting for global index queries with criteria on both hash and range not possible");
156156

0 commit comments

Comments
 (0)