0
開始頂点と終了頂点を持つエッジを特定しようとしています。OrientDBはdirection.OUTでエッジを取得できません
vertexStart.getEdges(Direction.OUT, relationshipId)
常に空のようだ:私は呼んでいる。この目的のため
。
到着エッジの取得は機能しているようですが、両方が必要です。
vertexStart.getEdges(Direction.IN, relationshipId)
relationshipIdはエッジのラベルです。
Iterable<Vertex> startNodes = this.getVertexList(storage.getStartNode(), graph);
Iterable<Vertex> endNodes = this.getVertexList(storage.getEndNode(), graph);
for (Vertex startNode : startNodes)
{
for (Vertex endNode : endNodes)
{
String edgeClass = "class:" + storage.getId();
Edge edge = startNode.addEdge(edgeClass, endNode);
for (Map.Entry<String, Object> entry : storage.getProperties().entrySet())
{
edge.setProperty(entry.getKey(), entry.getValue());
}
edge.setProperty(Constants.TAG_HASH, HashCreator.sha1FromRelationship(storage));
edge.setProperty(Constants.TAG_SNAPSHOT_ID, snapshotId);
}
}
graph.commit();
構造の作成に使用します。
使用しているorientdbのバージョンは何ですか? –
コンパイルグループ: 'com.orientechnologies'、名前: 'orientdb-graphdb'、バージョン: '2.2.11' – user2524707
@AlessandroRotaご存知ですか? – user2524707