Fix not sending request details

This commit is contained in:
Tadgh 2021-05-04 16:18:34 -04:00
parent 9e61136c2d
commit fcc662da79
2 changed files with 4 additions and 3 deletions

View File

@ -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.api.dao.IFhirResourceDao;
import ca.uhn.fhir.jpa.dao.data.IResourceTableDao; import ca.uhn.fhir.jpa.dao.data.IResourceTableDao;
import ca.uhn.fhir.jpa.model.entity.ResourceTable; 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.searchparam.SearchParameterMap;
import ca.uhn.fhir.jpa.util.QueryChunker; import ca.uhn.fhir.jpa.util.QueryChunker;
import ca.uhn.fhir.rest.api.server.storage.ResourcePersistentId; 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) { public ResourceVersionMap getVersionMap(String theResourceName, SearchParameterMap theSearchParamMap) {
IFhirResourceDao<?> dao = myDaoRegistry.getResourceDao(theResourceName); IFhirResourceDao<?> dao = myDaoRegistry.getResourceDao(theResourceName);
List<Long> matchingIds = dao.searchForIds(theSearchParamMap, null).stream() List<Long> matchingIds = dao.searchForIds(theSearchParamMap, new SystemRequestDetails()).stream()
.map(ResourcePersistentId::getIdAsLong) .map(ResourcePersistentId::getIdAsLong)
.collect(Collectors.toList()); .collect(Collectors.toList());

View File

@ -29,8 +29,8 @@ import javax.annotation.Nullable;
public interface IRequestPartitionHelperSvc { public interface IRequestPartitionHelperSvc {
@Nonnull @Nonnull
RequestPartitionId determineReadPartitionForRequest(@Nullable RequestDetails theRequest, String theResourceType); RequestPartitionId determineReadPartitionForRequest(RequestDetails theRequest, String theResourceType);
@Nonnull @Nonnull
RequestPartitionId determineCreatePartitionForRequest(@Nullable RequestDetails theRequest, @Nonnull IBaseResource theResource, @Nonnull String theResourceType); RequestPartitionId determineCreatePartitionForRequest(RequestDetails theRequest, @Nonnull IBaseResource theResource, @Nonnull String theResourceType);
} }