eclipse-basyx / basyx-java-server-sdk

MIT License
59 stars 46 forks source link

[BUG] PUT/PATCH on File SubmodelElement deletes Attachment file #405

Open aaronzi opened 2 months ago

aaronzi commented 2 months ago

Describe the bug When Updating a file SubmodelElement (without changing the value of the file SME), the attachment file get's deleted. This is due to how updating the element works. First the Element get's deleted and then replaced by the new element coming from the users request. Deleting the element includes the deletion of the attachment.

To Reproduce Steps to reproduce the behavior:

  1. Go to a file SME including an attachment
  2. Update the file SME via PUT request (e.g. the desciption)
  3. try to fetch the attachment again of that file SME
  4. See a 404 error

Expected behavior When the path does not get updated or the file deleted entirely, the attachment should not get removed.

BaSyx (please complete the following information):