diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/7_6_0/6325_partitioned_search.yaml b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/7_6_0/6325_partitioned_search.yaml new file mode 100644 index 00000000000..099795b771c --- /dev/null +++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/7_6_0/6325_partitioned_search.yaml @@ -0,0 +1,4 @@ +--- +type: add +issue: 6325 +title: "Add support for including the partitioning column in search query joins." diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/builder/sql/SearchQueryExecutor.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/builder/sql/SearchQueryExecutor.java index fd4d1dec215..48a1d50d6df 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/builder/sql/SearchQueryExecutor.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/builder/sql/SearchQueryExecutor.java @@ -157,8 +157,7 @@ public class SearchQueryExecutor implements ISearchQueryExecutor { } else { // fixme reverse Integer nextPartitionId = (Integer) nextRowAsArray[0]; - Long nextResourceId = (Long) nextRowAsArray[1]; - myNext = nextResourceId; + myNext = (Long) nextRowAsArray[1]; } } } diff --git a/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/config/PartitionSettings.java b/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/config/PartitionSettings.java index 374a18ddd94..96aba5a4308 100644 --- a/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/config/PartitionSettings.java +++ b/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/config/PartitionSettings.java @@ -39,7 +39,7 @@ public class PartitionSettings { /** * Is the table partition column (usually PARTITION_ID) - * participating and primary and foreign keys. + * participating in primary and foreign keys. * Affects sql joins, sql in() expressions, etc. */ public boolean isPartitionIdsInPrimaryKeys() {