Get outgoing/ingoing relationship for a class