You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are storing the ids of vertices in an external tool and try to find a vertex later by its id.
Instead of the ORecordId returned by vertex.getId() we take the result of ORecordId’s toString() method. It looks like “#9:-3”.
It’s no problem to find a vertex by graphDB.getVertex(“#9:-3”)
But if this vertex has more than one edge and we try to remove one edge this warning is logged:
“WARNING: Edge not found in vertex's property #9:-2.out_rs01 set while removing the edge #9:-3”
Debugging this warning yields to this call stack
IdentyHashMap<K,V>.containsKey(Object) line 355
OMVRBTreeRID.remove line 201
OMVRBTreeRIDSet.remove line 123
OrientEdge.dropEdgeFromVertex line 441
OrientEdge.remove line 231
…
IdentyHashMap containsKey tests keys by “==” and not by “equals” and can therefore not find the vertex returned by graphDB.getVertex(“#9:-3”).
The behavior can be reproduced by this unit test:
public void testRemoveEdge() {
String nameRs1 = "rs01";
// create three vertices
Vertex vSource = graphDB.addVertex(1);
Vertex vTarget1 = graphDB.addVertex(2);
Vertex vTarget2 = graphDB.addVertex(3);
// take the string representation of ORecordId
String id = vTarget1.getId().toString();
// find vertex by the string representation of its id
vTarget2 = graphDB.getVertex(id);
Edge e1 = vSource.addEdge(nameRs1,vTarget1);
vSource.addEdge(nameRs1,vTarget2);
// WARNING: Edge not found….
e1.remove();
graphDB.commit();
}
We are using Blueprints 2.5.0-SNAPSHOT and OrientDB 1.6.1
The graph database is configure by
We are storing the ids of vertices in an external tool and try to find a vertex later by its id.
Instead of the ORecordId returned by vertex.getId() we take the result of ORecordId’s toString() method. It looks like “#9:-3”.
It’s no problem to find a vertex by graphDB.getVertex(“#9:-3”)
But if this vertex has more than one edge and we try to remove one edge this warning is logged:
“WARNING: Edge not found in vertex's property #9:-2.out_rs01 set while removing the edge #9:-3”
Debugging this warning yields to this call stack
IdentyHashMap containsKey tests keys by “==” and not by “equals” and can therefore not find the vertex returned by graphDB.getVertex(“#9:-3”).
The behavior can be reproduced by this unit test:
We are using Blueprints 2.5.0-SNAPSHOT and OrientDB 1.6.1
The graph database is configure by
The text was updated successfully, but these errors were encountered: