diff --git a/hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/model/DeleteConflictList.java b/hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/model/DeleteConflictList.java index 6aaf63547de..74e40219307 100644 --- a/hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/model/DeleteConflictList.java +++ b/hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/model/DeleteConflictList.java @@ -127,6 +127,10 @@ public class DeleteConflictList implements Iterable { return myList.size(); } + public void removeAll() { + this.removeIf(x -> true); + } + @Override public String toString() { return myList.toString(); diff --git a/hapi-fhir-jpaserver-empi/src/main/java/ca/uhn/fhir/jpa/empi/svc/EmpiPersonDeletingSvc.java b/hapi-fhir-jpaserver-empi/src/main/java/ca/uhn/fhir/jpa/empi/svc/EmpiPersonDeletingSvc.java index dbbdc27b735..6c91b429343 100644 --- a/hapi-fhir-jpaserver-empi/src/main/java/ca/uhn/fhir/jpa/empi/svc/EmpiPersonDeletingSvc.java +++ b/hapi-fhir-jpaserver-empi/src/main/java/ca/uhn/fhir/jpa/empi/svc/EmpiPersonDeletingSvc.java @@ -95,10 +95,10 @@ public class EmpiPersonDeletingSvc { DeleteConflictList newBatch = new DeleteConflictList(); for (DeleteConflict next : theDcl) { IdDt nextSource = next.getSourceId(); - ourLog.info("Have delete conflict {} - Cascading delete", next); + ourLog.info("Have delete conflict {} - Cascading delete", nextSource); theDao.delete(nextSource.toVersionless(), newBatch, null, null); } - theDcl.removeIf(x -> true); + theDcl.removeAll(); theDcl.addAll(newBatch); } }