testSearchResourceLinkWithChain is failing
This commit is contained in:
parent
6ca97df1c9
commit
a687d7c9c1
|
@ -364,8 +364,7 @@ class PredicateBuilderReference extends BasePredicateBuilder {
|
||||||
|
|
||||||
Subquery<Long> createLinkSubquery(boolean theFoundChainMatch, String theChain, String theSubResourceName, List<IQueryParameterType> theOrValues, RequestDetails theRequest) {
|
Subquery<Long> createLinkSubquery(boolean theFoundChainMatch, String theChain, String theSubResourceName, List<IQueryParameterType> theOrValues, RequestDetails theRequest) {
|
||||||
Subquery<Long> subQ = myQueryRoot.subquery(Long.class);
|
Subquery<Long> subQ = myQueryRoot.subquery(Long.class);
|
||||||
Root<ResourceTable> subQfrom = subQ.from(ResourceTable.class);
|
subQ.select(myQueryRoot.get("myId").as(Long.class));
|
||||||
subQ.select(subQfrom.get("myId").as(Long.class));
|
|
||||||
|
|
||||||
List<List<IQueryParameterType>> andOrParams = new ArrayList<>();
|
List<List<IQueryParameterType>> andOrParams = new ArrayList<>();
|
||||||
andOrParams.add(theOrValues);
|
andOrParams.add(theOrValues);
|
||||||
|
@ -584,22 +583,7 @@ class PredicateBuilderReference extends BasePredicateBuilder {
|
||||||
} else {
|
} else {
|
||||||
throw new InvalidRequestException("Unexpected search parameter type encountered, expected token type for _id search");
|
throw new InvalidRequestException("Unexpected search parameter type encountered, expected token type for _id search");
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
// else if ((searchParam.getName().equals(Constants.PARAM_TAG)) ||
|
|
||||||
// (searchParam.equals(Constants.PARAM_SECURITY))) {
|
|
||||||
// TokenParam param = new TokenParam();
|
|
||||||
// param.setValueAsQueryToken(null,
|
|
||||||
// null,
|
|
||||||
// null,
|
|
||||||
// ((SearchFilterParser.FilterParameter) theFilter).getValue());
|
|
||||||
// return addPredicateTag(Collections.singletonList(Collections.singletonList(param)),
|
|
||||||
// searchParam.getName());
|
|
||||||
// }
|
|
||||||
// else if (searchParam.equals(Constants.PARAM_PROFILE)) {
|
|
||||||
// addPredicateTag(Collections.singletonList(Collections.singletonList(new UriParam(((SearchFilterParser.FilterParameter) theFilter).getValue()))),
|
|
||||||
// searchParam.getName());
|
|
||||||
// }
|
|
||||||
else {
|
|
||||||
RestSearchParameterTypeEnum typeEnum = searchParam.getParamType();
|
RestSearchParameterTypeEnum typeEnum = searchParam.getParamType();
|
||||||
if (typeEnum == RestSearchParameterTypeEnum.URI) {
|
if (typeEnum == RestSearchParameterTypeEnum.URI) {
|
||||||
return myPredicateBuilder.addPredicateUri(theResourceName, theFilter.getParamPath().getName(), Collections.singletonList(new UriParam(theFilter.getValue())), theFilter.getOperation());
|
return myPredicateBuilder.addPredicateUri(theResourceName, theFilter.getParamPath().getName(), Collections.singletonList(new UriParam(theFilter.getValue())), theFilter.getOperation());
|
||||||
|
|
|
@ -1821,8 +1821,10 @@ public class FhirResourceDaoR4SearchNoHashesTest extends BaseJpaR4Test {
|
||||||
|
|
||||||
ourLog.info("P1[{}] P2[{}] O1[{}] O2[{}] D1[{}]", patientId01, patientId02, obsId01, obsId02, drId01);
|
ourLog.info("P1[{}] P2[{}] O1[{}] O2[{}] D1[{}]", patientId01, patientId02, obsId01, obsId02, drId01);
|
||||||
|
|
||||||
|
myCaptureQueriesListener.clear();
|
||||||
List<Observation> result = toList(myObservationDao
|
List<Observation> result = toList(myObservationDao
|
||||||
.search(new SearchParameterMap().setLoadSynchronous(true).add(Observation.SP_SUBJECT, new ReferenceParam(Patient.SP_IDENTIFIER, "urn:system|testSearchResourceLinkWithChain01"))));
|
.search(new SearchParameterMap().setLoadSynchronous(true).add(Observation.SP_SUBJECT, new ReferenceParam(Patient.SP_IDENTIFIER, "urn:system|testSearchResourceLinkWithChain01"))));
|
||||||
|
myCaptureQueriesListener.logAllQueriesForCurrentThread();
|
||||||
assertEquals(1, result.size());
|
assertEquals(1, result.size());
|
||||||
assertEquals(obsId01.getIdPart(), result.get(0).getIdElement().getIdPart());
|
assertEquals(obsId01.getIdPart(), result.get(0).getIdElement().getIdPart());
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue