Count not requiring specific property name. (#1414)

Closes #1413.
This commit is contained in:
Michael Reiche
2022-04-19 16:57:52 -07:00
committed by GitHub
parent c1300841cb
commit f746d5f496
2 changed files with 3 additions and 4 deletions

View File

@@ -223,9 +223,8 @@ public class ReactiveFindByQueryOperationSupport implements ReactiveFindByQueryO
} else {
return throwable;
}
}).flatMapMany(ReactiveQueryResult::rowsAsObject).map(row -> {
return row.getLong(TemplateUtils.SELECT_COUNT);
}).next();
}).flatMapMany(ReactiveQueryResult::rowsAsObject).map(row -> row.getLong(row.getNames().iterator().next()))
.next();
});
}

View File

@@ -431,7 +431,7 @@ public class CouchbaseRepositoryQueryIntegrationTests extends ClusterAwareIntegr
@Test
void badCount() {
assertThrows(CouchbaseQueryExecutionException.class, () -> airportRepository.countBad());
assertThrows(NullPointerException.class, () -> airportRepository.countBad());
}
@Test