hapi-fhir-jpaserver-starter
hapi-fhir-jpaserver-starter copied to clipboard
Why are there two settings for creating missing resources
See file https://github.com/hapifhir/hapi-fhir-jpaserver-starter/blob/master/src/main/java/ca/uhn/fhir/jpa/starter/FhirServerConfigCommon.java on line 95 and 102.
setAutoCreatePlaceholderReferenceTargets is being called twice and (obviously) only acting upon allowPlaceholderReferences variable in hapi.properties.
Is this intended?
I think this is a bug because there are two different properties from hapi.properties file (auto_create_placeholder_reference_targets and allow_placeholder_references) that initialize the same ca.uhn.fhir.jpa.api.config.DaoConfig property (myAutoCreatePlaceholderReferenceTargets):
DaoConfig retVal = new DaoConfig();
...
retVal.setAutoCreatePlaceholderReferenceTargets(this.autoCreatePlaceholderReferenceTargets);
...
retVal.setAutoCreatePlaceholderReferenceTargets(this.allowPlaceholderReferences);
This makes the auto_create_placeholder_reference_targets property completely useless since its value is overridden by the allow_placeholder_references value.
@j-fbriere You are right. I just asked this question in the fhir chat
I'll be glad to send a PR, if you are all ok
I'll be glad to send a PR, if you are all ok
Please do, thank you.
Closing as stale