Create RelationshipRepository for custom queries

And move getting relationships methods to it.