From a0366befc4f1b55ee42b1531ac636ce3d7f2fc6d Mon Sep 17 00:00:00 2001 From: jamesagnew Date: Wed, 2 Jun 2021 16:47:02 -0400 Subject: [PATCH] Forward port fix --- .../jpa/search/builder/predicate/DatePredicateBuilder.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/builder/predicate/DatePredicateBuilder.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/builder/predicate/DatePredicateBuilder.java index 601be81bf33..cc21fa3e594 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/builder/predicate/DatePredicateBuilder.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/builder/predicate/DatePredicateBuilder.java @@ -142,7 +142,7 @@ public class DatePredicateBuilder extends BaseSearchParamPredicateBuilder { } else if (upperBoundInstant != null) { ub = theFrom.createPredicate(lowValueField, ParamPrefixEnum.LESSTHAN_OR_EQUALS, genericUpperBound); if (myDaoConfig.isAccountForDateIndexNulls()) { - ub = ComboCondition.or(ub, theFrom.createPredicate(highValueField, ParamPrefixEnum.LESSTHAN_OR_EQUALS, genericLowerBound)); + ub = ComboCondition.or(ub, theFrom.createPredicate(highValueField, ParamPrefixEnum.LESSTHAN_OR_EQUALS, genericUpperBound)); } } else { throw new InvalidRequestException("lowerBound and upperBound value not correctly specified for comparing " + theOperation); @@ -152,7 +152,7 @@ public class DatePredicateBuilder extends BaseSearchParamPredicateBuilder { if (upperBoundInstant != null) { ub = theFrom.createPredicate(highValueField, ParamPrefixEnum.GREATERTHAN_OR_EQUALS, genericUpperBound); if (myDaoConfig.isAccountForDateIndexNulls()) { - ub = ComboCondition.or(ub, theFrom.createPredicate(lowValueField, ParamPrefixEnum.GREATERTHAN_OR_EQUALS, genericLowerBound)); + ub = ComboCondition.or(ub, theFrom.createPredicate(lowValueField, ParamPrefixEnum.GREATERTHAN_OR_EQUALS, genericUpperBound)); } } else if (lowerBoundInstant != null) { lb = theFrom.createPredicate(highValueField, ParamPrefixEnum.GREATERTHAN_OR_EQUALS, genericLowerBound);