From fcc662da79270891d5c5ed10dba88f920fe71e53 Mon Sep 17 00:00:00 2001 From: Tadgh Date: Tue, 4 May 2021 16:18:34 -0400 Subject: [PATCH] Fix not sending request details --- .../java/ca/uhn/fhir/jpa/cache/ResourceVersionSvcDaoImpl.java | 3 ++- .../ca/uhn/fhir/jpa/partition/IRequestPartitionHelperSvc.java | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/cache/ResourceVersionSvcDaoImpl.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/cache/ResourceVersionSvcDaoImpl.java index 238bb6d94ff..aa2c9ef2ad9 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/cache/ResourceVersionSvcDaoImpl.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/cache/ResourceVersionSvcDaoImpl.java @@ -24,6 +24,7 @@ import ca.uhn.fhir.jpa.api.dao.DaoRegistry; import ca.uhn.fhir.jpa.api.dao.IFhirResourceDao; import ca.uhn.fhir.jpa.dao.data.IResourceTableDao; import ca.uhn.fhir.jpa.model.entity.ResourceTable; +import ca.uhn.fhir.jpa.partition.SystemRequestDetails; import ca.uhn.fhir.jpa.searchparam.SearchParameterMap; import ca.uhn.fhir.jpa.util.QueryChunker; import ca.uhn.fhir.rest.api.server.storage.ResourcePersistentId; @@ -52,7 +53,7 @@ public class ResourceVersionSvcDaoImpl implements IResourceVersionSvc { public ResourceVersionMap getVersionMap(String theResourceName, SearchParameterMap theSearchParamMap) { IFhirResourceDao dao = myDaoRegistry.getResourceDao(theResourceName); - List matchingIds = dao.searchForIds(theSearchParamMap, null).stream() + List matchingIds = dao.searchForIds(theSearchParamMap, new SystemRequestDetails()).stream() .map(ResourcePersistentId::getIdAsLong) .collect(Collectors.toList()); diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/partition/IRequestPartitionHelperSvc.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/partition/IRequestPartitionHelperSvc.java index 54aa3e2b483..9b2c134df11 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/partition/IRequestPartitionHelperSvc.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/partition/IRequestPartitionHelperSvc.java @@ -29,8 +29,8 @@ import javax.annotation.Nullable; public interface IRequestPartitionHelperSvc { @Nonnull - RequestPartitionId determineReadPartitionForRequest(@Nullable RequestDetails theRequest, String theResourceType); + RequestPartitionId determineReadPartitionForRequest(RequestDetails theRequest, String theResourceType); @Nonnull - RequestPartitionId determineCreatePartitionForRequest(@Nullable RequestDetails theRequest, @Nonnull IBaseResource theResource, @Nonnull String theResourceType); + RequestPartitionId determineCreatePartitionForRequest(RequestDetails theRequest, @Nonnull IBaseResource theResource, @Nonnull String theResourceType); }