Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Update request through the HAPI client sets ID of all resources to the ID of the top resource #446
When sending an update request through the HAPI client, the ID of all resources is overwritten and set to the ID of the top level resource. This causes problems in further handling of the resources and resource references. The project uses DSTU2 structures. This problem does not occur in version 1.2.
We have narrowed down the cause to the class ca.uhn.fhir.rest.method.MethodUtil in hapi-fhir-base project. This class contains the method createUpdateInvocation(IBaseResource, String, IIdType, FhirContext). In this method there is the following line (line 219 in the file):
When this line is removed our own project worked as expected, however, some tests in the project hapi-fhir-structures-dstu3 failed.