Thow exception if invalid relationship.