From 3556299332cce58ff58d07dd3b660fa7b24cd891 Mon Sep 17 00:00:00 2001 From: Tadgh Date: Thu, 19 Aug 2021 17:25:15 -0400 Subject: [PATCH] Add another failing Test --- .../FhirResourceDaoR4VersionedReferenceTest.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4VersionedReferenceTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4VersionedReferenceTest.java index 7476befb401..f61bf54ae59 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4VersionedReferenceTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4VersionedReferenceTest.java @@ -832,5 +832,19 @@ public class FhirResourceDaoR4VersionedReferenceTest extends BaseJpaR4Test { assertThat(versionedPatientReference, is(equalTo("Patient/RED/_history/1"))); } + @Test + public void testNoNpeMinimal() { + myDaoConfig.setAutoCreatePlaceholderReferenceTargets(true); + myModelConfig.setAutoVersionReferenceAtPaths("Observation.subject"); + + Observation obs = new Observation(); + obs.setId("Observation/DEF"); + obs.setSubject(new Reference("Patient/RED")); + BundleBuilder builder = new BundleBuilder(myFhirCtx); + builder.addTransactionUpdateEntry(obs); + + mySystemDao.transaction(new SystemRequestDetails(), (Bundle) builder.getBundle()); + } + }