Ticket #1011 (closed Defect: fixed)
Deleting a type with a delete-topic operation
Reported by: | jri | Owned by: | jri |
---|---|---|---|
Priority: | Major | Milestone: | Release 4.8.4 |
Component: | DeepaMehta Standard Distribution | Version: | 4.8.3 |
Keywords: | Cc: | dgf, Malte, JuergeN | |
Complexity: | 3 | Area: | Robustness |
Module: | deepamehta-core |
Description
Serious DB corruption happens when a type is deleted with a generic delete-topic operation. In that case the "instances exist?" check is not performed and the type is deleted even if instances still exist.
This applies to both, the Core API, and the REST API. In the following examples 1234 is the ID of a type topic (that is either a topic type or an association type):
Example (Core API):
dms.getTopic(1234).delete()
Example (REST API):
DELETE /core/topic/1234
DM should reject a delete-topic operation when the specified topic is actually a type.
Note: the developer MUST use the explicit delete-type operation to delete a type.