-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
API V2: The patch operation "remove" doesn't remove cross references #207
Comments
Note: this is only an issue for the "EMF-like" Json Patches, using this syntax to delete an object from the model:
Which corresponds to an EMF "Delete Command". For standard Json Patches, the semantic is instead closer to the EMF "Remove Command":
or an
In these cases, we don't want to remove cross-references. However, it is unclear to me what the expected behavior is, when unsetting/removing an object from a Containment reference (when IMO, it makes sense to treat removal from a Containment reference like a Deletion, and also clean-up all cross references. If the Client intends to reuse the Object, it would use a "Move" operation instead (Although this isn't supported yet: issue #179), or an "Add" to the new location (EMF is then responsible for removing the object from its former parent, and adding it to the new parent). |
- Use DeleteCommand instead of RemoveCommand, when deleting an object (Remove from list and Unset feature still rely on RemoveCommand or SetCommand and won't modify cross-references) fixes #207
- Use DeleteCommand instead of RemoveCommand, when deleting an object (Remove from list and Unset feature still rely on RemoveCommand or SetCommand and won't modify cross-references) fixes #207 Contributed on behalf of STMicroelectronics. Signed-off-by: Camille Letavernier <cletavernier@eclipsesource.com>
- Use DeleteCommand instead of RemoveCommand, when deleting an object (Remove from list and Unset feature still rely on RemoveCommand or SetCommand and won't modify cross-references) fixes #207 Contributed on behalf of STMicroelectronics. Signed-off-by: Camille Letavernier <cletavernier@eclipsesource.com>
When using the Patch operation "remove" to delete an object from the model, cross references are not unset. This is a bug in the JsonPatchHelper, that returns a "Remove" command instead of a "Delete" command.
The text was updated successfully, but these errors were encountered: