return RestRelationship.create((RestNode)startNode,(RestNode)endNode,type,props);
}
@Override
public <T extends PropertyContainer> Index<T> getIndex(String indexName) {
final RestIndexManager index = index();
if (index.existsForNodes(indexName)) return (Index<T>) index.forNodes(indexName);
if (index.existsForRelationships(indexName)) return (Index<T>) index.forRelationships(indexName);
throw new IllegalArgumentException("Index "+indexName+" does not yet exist");
}