Is there a hook when a relation is created, updated or deleted? I know how to use hooks like hook_node_presave. Is there also a hook to catch the deletion of a relation or the update of a relation? In the API I cannot find anything.
Maybe there is a workaround?

Thanks.
Relations are themselves entities, so you can use the entity hooks:


hook_entity_insert()
hook_entity_update()
hook_entity_presave()


and so on, checking the $type parameter to react only for the appropriate entity type(s).

There's a full list of available entity hooks in the system.api.php file.