From 3ee05b5a62c57375e44539b4d70698d49d863e85 Mon Sep 17 00:00:00 2001 From: jamesagnew Date: Sun, 13 Jun 2021 19:42:26 -0400 Subject: [PATCH] Refactor transaction processing --- .../ca/uhn/fhir/jpa/dao/BaseTransactionProcessor.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseTransactionProcessor.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseTransactionProcessor.java index b8ae25e13d5..c78b2522ff2 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseTransactionProcessor.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseTransactionProcessor.java @@ -680,9 +680,13 @@ public abstract class BaseTransactionProcessor { nextResourceId = res.getIdElement(); - if (!nextResourceId.hasIdPart()) { - if (isNotBlank(myVersionAdapter.getFullUrl(nextReqEntry))) { - nextResourceId = newIdType(myVersionAdapter.getFullUrl(nextReqEntry)); + String fullUrl = myVersionAdapter.getFullUrl(nextReqEntry); + if (isNotBlank(fullUrl)) { + IIdType fullUrlIdType = newIdType(fullUrl); + if (isPlaceholder(fullUrlIdType)) { + nextResourceId = fullUrlIdType; + } else if (!nextResourceId.hasIdPart()) { + nextResourceId = fullUrlIdType; } }