Open patrick-werner opened 3 years ago
It seems, this also applies for the cascade/expunge-combination: https://chat.fhir.org/#narrow/stream/179167-hapi/topic/JPA.20Server.20-.20Cascade.20Delete.20with.20Expunge/near/230875113
@patrick-werner, I've observed something similar: the response only identifies the one resource (e.g. DR in your case) but does not identify the resources to which the delete was cascaded (e.g. OBS in your case). However, the logs did show the delete being cascaded, and all of the expected resources were deleted.
Is this what you are observing or are the Observations truly not deleted?
Attn. @KevinDougan-SmileCDR as I understand he is working on the issue I've described.
Also, are you able to replicate this on hapi.fhir.org?
I tested cascade deletes for a demo about a week ago and it was working for me..
@patrick-werner, I've observed something similar: the response only identifies the one resource (e.g. DR in your case) but does not identify the resources to which the delete was cascaded (e.g. OBS in your case). However, the logs did show the delete being cascaded, and all of the expected resources were deleted.
Is this what you are observing or are the Observations truly not deleted?
Attn. @KevinDougan-SmileCDR as I understand he is working on the issue I've described.
no in our case the Observations were still on the server.
Also, are you able to replicate this on hapi.fhir.org?
I tested cascade deletes for a demo about a week ago and it was working for me..
Tested it on the public server, still failing. I also created a test case for you @jamesagnew @dmuylwyk : http://hapi.fhir.org/baseR4/DiagnosticReport/2004297
If i try to cascade delete the DR, only the DR is deleted, not the observations.
Also, are you able to replicate this on hapi.fhir.org?
I tested cascade deletes for a demo about a week ago and it was working for me.. @jamesagnew @dmuylwyk
Yes. And i am still able to reproduce it. Steps to reproduce:
DELETE: http://hapi.fhir.org/baseR4/DiagnosticReport/2004297?_cascade=delete
GET: http://hapi.fhir.org/baseR4/Observation/2004286
The observations aren't deleted.
Same for a local jpa-starter server(config: allow_cascading_deletes: true, enforce_referential_integrity_on_delete: true)
@jamesagnew @dmuylwyk
i created a test case for this issue, which reproduced the issue: https://github.com/hapifhir/hapi-fhir/blob/6eb23162f3122b618e3d7bf6e4fedc8ebdb2133f/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/ResourceProviderCascadeDeleteR4Test.java
@patrick-werner is this solve or it is still open?
@MCoderIndia I observed this recently.
Describe the bug Patrick Werner: Just tried to use ?_cascade=delete with hapi (jpastarter) 5.3.0, which isn't working.
I tried it with DiagnosticReports and Observations {{baseurl}}/DiagnosticReport/24591/?_cascade=delete
Patrick Werner: This only deletes the DR, not the Observation. HAPI returns: "succesful deleted 1 resource(s)"
To Reproduce Steps to reproduce the behavior:
Expected behavior Diagnostic Report AND Observations are deleted
Environment (please complete the following information):