Ensuring referential integrity for saved objects deleted from saved objects management #146044
Labels
Feature:Saved Objects Management
Team:Core
Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc
Deleting a saved object from saved objects management does not enforce referential integrity. That means when there's a parent to child or child to parent references, deleting the parent does not delete it's children.
Sometimes this is the desired behaviour, e.g. deleting a dashboard should not delete all the visualisations in the visualisations library references by this dashboard.
Other times this is undesired, like when a case is deleted we might want to delete all the cases-comments and cases-user-actions so that we don't leave "orphaned" objects which continuously accumalate but have no value.
When there's a parent to child reference, it's possible to delete the child leaving the parent in an inconsistent state. For instance deleting the data view used by a dashboard that effectively breaks the dashboard, although the impact of this change isn't obvious to the user performing the action.
Given that the correct action to take here very much depends on the domain of the plugin, this logic needs to be specified by the plugin.
There are a couple of options here:
The text was updated successfully, but these errors were encountered: