Submitting a transaction bundle with a resource that should be deleted (conditional delete), created (conditional create), and at the same time is referenced in another resource in the bundle causes excessive hibernate warnings in the logs.
Steps To Reproduce:
- Send a transaction Bundle to fhir endpoint that contains:
- Conditional create of DiagnosticReport with reference to the Observation
- Conditional Delete of the Observation
- Conditional Update of the Observation
POST: {fhir-endpoint}/
{
"resourceType":"Bundle",
"type":"transaction",
"entry":[
{
"fullUrl":"urn:uuid:20bba904-ba7f-491b-bcf3-5c0d701d5c77",
"resource":{
"resourceType":"DiagnosticReport",
"identifier":[
{
"system":"http://www.example.com/observation/identifier",
"value":"4efd83e1-bd68-45c1-be93-3e18c1616ce8"
}
],
"status":"final",
"effectivePeriod":{
"start":"2022-06-09T16:57:00-04:00",
"end":"2022-06-09T16:57:00-04:00"
},
"issued":"2022-07-06T15:18:00.000-04:00",
"result":[
{
"reference":"urn:uuid:48a38db0-102a-4f02-bd81-7d4a3d8cd27c"
}
]
},
"request":{
"method":"PUT",
"url":"/DiagnosticReport?identifier=http://www.example.com/observation/identifier|4efd83e1-bd68-45c1-be93-3e18c1616ce8"
}
},
{
"request":{
"method":"DELETE",
"url":"Observation?identifier=http://www.example.com/observation/identifier|bea0c294-9bad-404a-b550-0fff77add1b1"
}
},
{
"fullUrl":"urn:uuid:48a38db0-102a-4f02-bd81-7d4a3d8cd27c",
"resource":{
"resourceType":"Observation",
"identifier":[
{
"system":"http://www.example.com/observation/identifier",
"value":"bea0c294-9bad-404a-b550-0fff77add1b1"
}
],
"status":"final",
"effectiveDateTime":"2022-07-06T14:35:00-04:00",
"valueQuantity":{
"value":9,
"comparator":"<",
"unit":"GPL^^u/mL",
"system":"https://www.ciussscentreouest.ca/codesystem/observation-units/softlab",
"code":"GPL^^u/mL"
},
"referenceRange":[
{
"low":{
"value":0,
"unit":"GPL^^u/mL",
"system":"https://www.ciussscentreouest.ca/codesystem/observation-units/softlab",
"code":"GPL^^u/mL"
},
"high":{
"value":21,
"unit":"GPL^^u/mL",
"system":"https://www.ciussscentreouest.ca/codesystem/observation-units/softlab",
"code":"GPL^^u/mL"
},
"text":"0-21"
}
]
},
"request":{
"method":"POST",
"url":"/Observation"
}
}
]
}
-
Re-send the same transaction Bundle again.
(this is required as at first time there is no Observation to delete)
-
Check the logs.
Actual result
22:50:45.194 [fhir_endpoint.fhirEndpointServer-176] WARN M:fhir_endpoint R:z8ArGf5sQ6jULosT T: S: J: C: o.h.p.entity.AbstractEntityPersister - HHH000502: The [myTargetResource] property of the [ca.uhn.fhir.jpa.model.entity.ResourceLink] entity was modified, but it won't be updated because the property is immutable.
Expected behavior
No excessive warnings in logs.
Submitting a transaction bundle with a resource that should be deleted (conditional delete), created (conditional create), and at the same time is referenced in another resource in the bundle causes excessive hibernate warnings in the logs.
Steps To Reproduce:
POST: {fhir-endpoint}/{ "resourceType":"Bundle", "type":"transaction", "entry":[ { "fullUrl":"urn:uuid:20bba904-ba7f-491b-bcf3-5c0d701d5c77", "resource":{ "resourceType":"DiagnosticReport", "identifier":[ { "system":"http://www.example.com/observation/identifier", "value":"4efd83e1-bd68-45c1-be93-3e18c1616ce8" } ], "status":"final", "effectivePeriod":{ "start":"2022-06-09T16:57:00-04:00", "end":"2022-06-09T16:57:00-04:00" }, "issued":"2022-07-06T15:18:00.000-04:00", "result":[ { "reference":"urn:uuid:48a38db0-102a-4f02-bd81-7d4a3d8cd27c" } ] }, "request":{ "method":"PUT", "url":"/DiagnosticReport?identifier=http://www.example.com/observation/identifier|4efd83e1-bd68-45c1-be93-3e18c1616ce8" } }, { "request":{ "method":"DELETE", "url":"Observation?identifier=http://www.example.com/observation/identifier|bea0c294-9bad-404a-b550-0fff77add1b1" } }, { "fullUrl":"urn:uuid:48a38db0-102a-4f02-bd81-7d4a3d8cd27c", "resource":{ "resourceType":"Observation", "identifier":[ { "system":"http://www.example.com/observation/identifier", "value":"bea0c294-9bad-404a-b550-0fff77add1b1" } ], "status":"final", "effectiveDateTime":"2022-07-06T14:35:00-04:00", "valueQuantity":{ "value":9, "comparator":"<", "unit":"GPL^^u/mL", "system":"https://www.ciussscentreouest.ca/codesystem/observation-units/softlab", "code":"GPL^^u/mL" }, "referenceRange":[ { "low":{ "value":0, "unit":"GPL^^u/mL", "system":"https://www.ciussscentreouest.ca/codesystem/observation-units/softlab", "code":"GPL^^u/mL" }, "high":{ "value":21, "unit":"GPL^^u/mL", "system":"https://www.ciussscentreouest.ca/codesystem/observation-units/softlab", "code":"GPL^^u/mL" }, "text":"0-21" } ] }, "request":{ "method":"POST", "url":"/Observation" } } ] }Re-send the same transaction Bundle again.
(this is required as at first time there is no Observation to delete)
Check the logs.
Actual result
22:50:45.194 [fhir_endpoint.fhirEndpointServer-176] WARN M:fhir_endpoint R:z8ArGf5sQ6jULosT T: S: J: C: o.h.p.entity.AbstractEntityPersister - HHH000502: The [myTargetResource] property of the [ca.uhn.fhir.jpa.model.entity.ResourceLink] entity was modified, but it won't be updated because the property is immutable.Expected behavior
No excessive warnings in logs.