'Trigger' system when certain objects are deleted from the database
There needs to be a trigger mechanism similar to SQL triggers. In our case, we probably need a 2 level system:
-
A NodeItem level trigger called when the item is deleted. For example, if we have an object of type Image in the database which represents an actual Image on the file system. When the user deletes the Image node in the database, there should be a way for the API client to define an action which will ask the user if he wishes to delete actual image on disk as well.
-
A MetaClass / MetaLink level trigger called when it is deleted. Such trigger would ensure data integrity. For example if the database contains objects which cannot exist without one another. For instance, a 'cluster' node might group 'data points'. If all the data points are deleted, the cluster should also be deleted.