Implemented createRelationshipQuery method.