manager: abstract common code for setting relation