handle paging case

This commit is contained in:
Ken Stevens 2019-11-13 16:59:01 -05:00 committed by James Agnew
parent f11d939131
commit ad8930fdba
1 changed files with 2 additions and 1 deletions

View File

@ -165,7 +165,8 @@ public class PersistedJpaBundleProvider implements IBundleProvider {
}
protected List<IBaseResource> doSearchOrEverything(final int theFromIndex, final int theToIndex) {
if (mySearchEntity.getNumFound() <= 0) {
if (mySearchEntity.getTotalCount() != null && mySearchEntity.getNumFound() <= 0) {
// This is a _summary=count search
return Collections.emptyList();
}
final ISearchBuilder sb = myDao.newSearchBuilder();