added limit and sorting modifiers to queryRelationship method