diff --git a/src/main/java/org/springframework/data/aerospike/repository/query/AerospikePartTreeQuery.java b/src/main/java/org/springframework/data/aerospike/repository/query/AerospikePartTreeQuery.java index 1409d10ce..ebf725a8d 100644 --- a/src/main/java/org/springframework/data/aerospike/repository/query/AerospikePartTreeQuery.java +++ b/src/main/java/org/springframework/data/aerospike/repository/query/AerospikePartTreeQuery.java @@ -69,7 +69,7 @@ public Object execute(Object[] parameters) { AerospikeCriteria criteria = query.getAerospikeCriteria(); Qualifier[] qualifiers = getQualifiers(criteria); Qualifier idQualifier; - if (isSingleIdQuery(criteria)) { // + if (isSingleIdQuery(criteria)) { return runIdQuery(entityClass, targetClass, getIdValue(qualifiers[0])); } else { if ((idQualifier = getIdQualifier(criteria)) != null) { diff --git a/src/test/java/org/springframework/data/aerospike/repository/PersonRepositoryQueryTests.java b/src/test/java/org/springframework/data/aerospike/repository/PersonRepositoryQueryTests.java index 655bbaf82..bb5531850 100644 --- a/src/test/java/org/springframework/data/aerospike/repository/PersonRepositoryQueryTests.java +++ b/src/test/java/org/springframework/data/aerospike/repository/PersonRepositoryQueryTests.java @@ -1255,7 +1255,7 @@ public void findPersonsByQualifiers() { .setFilterOperation(FilterOperation.LT) .setValue1AsObj(50000L) .build(); -// assertThat(repository.findByQualifier(sinceUpdateTimeLt50Seconds)).containsAll(allPersons); + assertThat(repository.findByQualifier(sinceUpdateTimeLt50Seconds)).containsAll(allPersons); // creating a condition "since_update_time metadata value is between 1 millisecond and 50 seconds" Qualifier sinceUpdateTimeBetween1And50000 = Qualifier.metadataBuilder() @@ -1278,8 +1278,8 @@ public void findPersonsByQualifiers() { .setFilterOperation(FilterOperation.EQ) .setValue1(Value.get(49)) .build(); -// result = repository.findByQualifier(ageEq49); -// assertThat(result).containsOnly(carter); + result = repository.findByQualifier(ageEq49); + assertThat(result).containsOnly(carter); // creating a condition "age is greater than 49" Qualifier ageGt49 = Qualifier.builder() @@ -1287,18 +1287,18 @@ public void findPersonsByQualifiers() { .setField("age") .setValue1(Value.get(49)) .build(); -// result = repository.findByQualifier(ageGt49); -// assertThat(result).doesNotContain(carter); + result = repository.findByQualifier(ageGt49); + assertThat(result).doesNotContain(carter); // creating a condition "id equals Carter's id" Qualifier keyEqCartersId = Qualifier.forId(carter.getId()); -// result = repository.findByQualifier(keyEqCartersId); -// assertThat(result).containsOnly(carter); + result = repository.findByQualifier(keyEqCartersId); + assertThat(result).containsOnly(carter); // creating a condition "id equals Boyd's id" Qualifier keyEqBoydsId = Qualifier.forId(boyd.getId()); -// result = repository.findByQualifier(keyEqBoydsId); -// assertThat(result).containsOnly(boyd); + result = repository.findByQualifier(keyEqBoydsId); + assertThat(result).containsOnly(boyd); // analogous to {@link SimpleAerospikeRepository#findAllById(Iterable)} // creating a condition "id equals Carter's id OR Boyd's id"