Bugfix revert deletion of entities with relations