Have a look at the code examples attached to this issue (
https://github.com/orientechnologies/orientdb/issues/4105). The example code shows ways to locate an edge, in order to update its properties, but once you've located it, you can delete it as well.
The simple (no indexes) implementation is this:
String type;
OrientVertex src, tgt;
for (Edge edge : src.getEdges( tgt, Direction.BOTH, type ) ) {
OrientEdge e = (OrientEdge) edge;
e.remove();
break;
}
This is fine as long as you don't have a lot of edges on the source node; if you have a lot of edges associated with a given node, you'll want to use heavyweight edges, index them, and then you can use OrientBaseGraph::getEdges() to search using the index for your edge and then remove it. (See the linked code for details).
- Craig -