I am working with orientDB using Java and I need to check if two vertices are connected, I tried to do a workaround be checking out and in edges for vertices and see if the other vertex in there, the solution works fine so far, i have seen that there is a method called "getEdgesBetweenVertexes()" but seems this method not existing in v 2.2 anymore
You can use the method called getEdges()
Example:
OrientVertex v1=graph.getVertex("#21:0");
OrientVertex v2=graph.getVertex("#26:1");
if(v2!=null){
Iterable<Edge> result=v1.getEdges(v2, Direction.BOTH, "E");
boolean connected=false;
for(Edge e:result){
connected=true;
break;
}
System.out.println(connected);
}
else{
System.out.println(false);
}
Hope it helps.