DATAES-500 - queryForList(CriteriaQuery query, Class<T> clazz) can't query all data.
Original pull request: #225
This commit is contained in:
@@ -68,7 +68,7 @@ public class ElasticsearchPartQuery extends AbstractElasticsearchRepositoryQuery
|
||||
return StreamUtils.createStreamFromIterator((CloseableIterator<Object>) elasticsearchOperations.stream(query, entityType));
|
||||
|
||||
} else if (queryMethod.isCollectionQuery()) {
|
||||
if (accessor.getPageable() == null) {
|
||||
if (accessor.getPageable().isUnpaged()) {
|
||||
int itemCount = (int) elasticsearchOperations.count(query, queryMethod.getEntityInformation().getJavaType());
|
||||
query.setPageable(PageRequest.of(0, Math.max(1, itemCount)));
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user