Comet: deletion of attached member Objects
when an Object is deleted, member Objects should be deleted IF AND ONLY IF the action would leave the member Object orphaned (i.e. query_service.find_parents(resource: component)
yields only the Object slated for deletion).
this effect should cascade down any membership hierarchy that exists (i.e. the deletion should be recursive over the member
relation). another way of thinking about this is that deleting an Object shouldn't orphan any of the Objects (or FileSets) that is (directly or transitively) a member of the deleted Object.
In the case that any member Object is directly a member of another Resource (an Object, or a Collection), it should simply be skipped. (there was some interest in adding this to audit log output, but since we don't currently store audit data, it's being held out of scope)
Acceptance Criteria:
-
When i delete Object A, member Object B is: -
deleted IF Object A is the only Resource the Object B is a member of: -
Objects deleted in this way should also have their members (Objects and FileSets) deleted, recursively.
-
-
NOT deleted if Object B is a member of any other Object or Collection.
-
Meeting Notes: https://docs.google.com/document/d/1aaEhpz3u2MOSghcZCPDItrTsDGM51EApBHlR4QOmanE/edit