hook generic relation to related objects in order to emulate delete on cascade