Function getAssociationsByRelation