diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/7_8_0/changes.yaml b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/7_8_0/changes.yaml
index 0331ee9c487f..4c86813da8e3 100644
--- a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/7_8_0/changes.yaml
+++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/7_8_0/changes.yaml
@@ -5,4 +5,40 @@
(dependent HAPI modules listed in brackets):
- org.hl7.fhir.core (Base): 6.3.25 -> 6.4.0
+ - spring-boot-bom (Base): 3.2.6 -> 3.3.5
+ - spring-retry (Base): 2.0.6 -> 2.0.10
+ - spring-data-bom (Base): 2023.1.6 -> 2024.0.5
+ - spring (Base): 6.1.8 -> 6.1.14
+ - slf4j-api (Base): 2.0.13 -> 2.0.16
+ - log4j-to-slf4j (Base): 2.19.0 -> 2.24.1
+ - jackson (Base): 2.17.1 -> 2.18.1
+ - jackson-databind (Base): 2.17.1 -> 2.18.1
+ - opentelemetry-instrumentation-bom (Base): 2.8.0 -> 2.9.0
+ - resteasy (Base): 6.2.9.Final -> 6.2.10.Final
+ - logback-classic (Base): 1.4.14 -> 1.5.12
+ - owasp-java-html-sanitizer (Base): 20211018.2 -> 20240325.1
+ - graphql-java (Base): 21.5 -> 22.3
+ - simple-java-mail (Base): 8.11.2 -> 8.12.2
+ - okio-jvm (Base): 3.4.0 -> 3.9.1
+ - commons-cli (Base): 1.5.0 -> 1.9.0
+ - org.jetbrains.annotations (Base): 23.0.0 -> 26.0.1
+ - xmlunit-core (Base): 2.4.0 -> 2.10.0
+ - jboss-logging (Tinder): 3.4.2.Final -> 3.6.1.Final
+ - springdoc-openapi-starter-webmvc-ui (Server): 2.2.0 -> 2.6.0
+ - ace-builds (Server): 1.22.0 -> 1.36.3
+ - bootstrap (Server): 4.5.2 -> 4.6.2
+ - Eonasdan-bootstrap-datetimepicker (Server): 4.17.47 -> 4.17.49
+ - font-awesome (Server): 5.8.2 -> 5.15.4
+ - swagger-ui (Server): 4.1.3 -> 4.19.1
+ - httpcore (Client): 4.4.13 -> 4.4.16
+ - httpclient (Client): 4.5.13 -> 4.5.14
+ - flyway (JPA): 9.4.0 -> 10.20.1
+ - hibernate (JPA): 6.4.1.Final -> 6.6.2.Final
+ - hibernate-search (JPA): 7.0.0.Final -> 7.2.1.Final
+ - elastic-apm (JPA): 1.44.0 -> 1.52.0
+ - elastic-search (JPA): 8.14.3 -> 8.15.3
+ - lucene (JPA): 9.8.0 -> 9.12.0
+ - postgresql (JPA): 42.7.3 -> 42.7.4
+ - mysql-connector-j (JPA): 8.2.0 -> 9.1.0
+ - ojdbc11 (JPA): 23.3.0.23.09 -> 23.6.0.24.10
"
diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/7_8_0/upgrade.md b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/7_8_0/upgrade.md
index e69de29bb2d1..d4b0609fbdd4 100644
--- a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/7_8_0/upgrade.md
+++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/7_8_0/upgrade.md
@@ -0,0 +1,3 @@
+## Entities annotations
+
+The `@Embedded` Annotation is no longer allowed, in presences of the `@Entity` one.
diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IBatch2WorkChunkRepository.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IBatch2WorkChunkRepository.java
index e9611614e45b..2b6462072957 100644
--- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IBatch2WorkChunkRepository.java
+++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IBatch2WorkChunkRepository.java
@@ -150,6 +150,6 @@ List fetchAllChunkIdsForStepWithStatus(
@Param("status") WorkChunkStatusEnum theStatus);
@Query(
- "SELECT new ca.uhn.fhir.batch2.model.BatchWorkChunkStatusDTO(e.myTargetStepId, e.myStatus, min(e.myStartTime), max(e.myEndTime), avg(e.myEndTime - e.myStartTime), count(*)) FROM Batch2WorkChunkEntity e WHERE e.myInstanceId=:instanceId GROUP BY e.myTargetStepId, e.myStatus")
+ "SELECT new ca.uhn.fhir.batch2.model.BatchWorkChunkStatusDTO(e.myTargetStepId, e.myStatus, min(e.myStartTime), max(e.myEndTime), avg(cast((e.myEndTime - e.myStartTime) as long)), count(*)) FROM Batch2WorkChunkEntity e WHERE e.myInstanceId=:instanceId GROUP BY e.myTargetStepId, e.myStatus")
List fetchWorkChunkStatusForInstance(@Param("instanceId") String theInstanceId);
}
diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/search/PathContext.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/search/PathContext.java
index 3576e9b79084..0aee74c44116 100644
--- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/search/PathContext.java
+++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/search/PathContext.java
@@ -20,9 +20,11 @@
package ca.uhn.fhir.jpa.dao.search;
import jakarta.annotation.Nonnull;
+import org.hibernate.search.engine.search.common.NamedValues;
import org.hibernate.search.engine.search.predicate.SearchPredicate;
import org.hibernate.search.engine.search.predicate.dsl.BooleanPredicateClausesStep;
import org.hibernate.search.engine.search.predicate.dsl.ExistsPredicateFieldStep;
+import org.hibernate.search.engine.search.predicate.dsl.KnnPredicateFieldStep;
import org.hibernate.search.engine.search.predicate.dsl.MatchAllPredicateOptionsStep;
import org.hibernate.search.engine.search.predicate.dsl.MatchIdPredicateMatchingStep;
import org.hibernate.search.engine.search.predicate.dsl.MatchNonePredicateFinalStep;
@@ -34,6 +36,8 @@
import org.hibernate.search.engine.search.predicate.dsl.NotPredicateFinalStep;
import org.hibernate.search.engine.search.predicate.dsl.PhrasePredicateFieldStep;
import org.hibernate.search.engine.search.predicate.dsl.PredicateFinalStep;
+import org.hibernate.search.engine.search.predicate.dsl.PrefixPredicateFieldStep;
+import org.hibernate.search.engine.search.predicate.dsl.QueryStringPredicateFieldStep;
import org.hibernate.search.engine.search.predicate.dsl.RangePredicateFieldStep;
import org.hibernate.search.engine.search.predicate.dsl.RegexpPredicateFieldStep;
import org.hibernate.search.engine.search.predicate.dsl.SearchPredicateFactory;
@@ -221,6 +225,11 @@ public WildcardPredicateFieldStep> wildcard() {
return myPredicateFactory.wildcard();
}
+ @Override
+ public PrefixPredicateFieldStep> prefix() {
+ return myPredicateFactory.prefix();
+ }
+
@Override
public RegexpPredicateFieldStep> regexp() {
return myPredicateFactory.regexp();
@@ -246,6 +255,11 @@ public SimpleQueryStringPredicateFieldStep> simpleQueryString() {
return myPredicateFactory.simpleQueryString();
}
+ @Override
+ public QueryStringPredicateFieldStep> queryString() {
+ return myPredicateFactory.queryString();
+ }
+
@Override
public ExistsPredicateFieldStep> exists() {
return myPredicateFactory.exists();
@@ -262,6 +276,16 @@ public NamedPredicateOptionsStep named(String path) {
return myPredicateFactory.named(path);
}
+ @Override
+ public KnnPredicateFieldStep knn(int i) {
+ return myPredicateFactory.knn(i);
+ }
+
+ @Override
+ public PredicateFinalStep withParameters(Function super NamedValues, ? extends PredicateFinalStep> function) {
+ return myPredicateFactory.withParameters(function);
+ }
+
@Override
public T extension(SearchPredicateFactoryExtension extension) {
return myPredicateFactory.extension(extension);
diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/graphql/GraphQLProviderWithIntrospection.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/graphql/GraphQLProviderWithIntrospection.java
index 1d08ddbc41da..cb34cc222ff5 100644
--- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/graphql/GraphQLProviderWithIntrospection.java
+++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/graphql/GraphQLProviderWithIntrospection.java
@@ -33,6 +33,8 @@
import ca.uhn.fhir.util.VersionUtil;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
+import com.google.gson.JsonArray;
+import com.google.gson.JsonSerializer;
import graphql.ExecutionResult;
import graphql.GraphQL;
import graphql.language.InterfaceTypeDefinition;
@@ -80,6 +82,7 @@ public class GraphQLProviderWithIntrospection extends GraphQLProvider {
private final ISearchParamRegistry mySearchParamRegistry;
private final VersionSpecificWorkerContextWrapper myContext;
private final IDaoRegistry myDaoRegistry;
+ private final Gson myGson;
/**
* Constructor
@@ -97,6 +100,11 @@ public GraphQLProviderWithIntrospection(
myContext = VersionSpecificWorkerContextWrapper.newVersionSpecificWorkerContextWrapper(theValidationSupport);
myGenerator = new GraphQLSchemaGenerator(myContext, VersionUtil.getVersion());
+
+ GsonBuilder gsonBuilder = new GsonBuilder();
+ gsonBuilder.registerTypeAdapter(Collections.emptyList().getClass(), (JsonSerializer