incubator-hugegraph
incubator-hugegraph copied to clipboard
Same edge label between different vertex labels
Expected behavior 期望表现
I would like to use the same edge label between different vertex label pairs:
graph.schema().edgeLabel("link").link('S1', 'T1').properties('foo').ifNotExist().create()
graph.schema().edgeLabel("link").link('S2', 'T2').properties('foo').ifNotExist().create()
or
graph.schema().edgeLabel("link").link('S1', 'T1').link('S2', 'T2').properties('foo').ifNotExist().create()
Actual behavior 实际表现
Link can be defined between one pair of vertex labels. Code also confirms that source label and target label are strings and not collections.
EdgeLabelBuilder.java:
private String sourceLabel;
private String targetLabel;
Steps to reproduce the problem 复现步骤
Run the above query.
Schema(VertexLabel, EdgeLabel, IndexLabel) 元数据结构
graph.schema().propertyKey('foo').asInt().ifNotExist().create()
graph.schema().propertyKey('bar').asInt().ifNotExist().create()
graph.schema().vertexLabel("S1").properties('foo', 'bar').ifNotExist().create()
graph.schema().vertexLabel("S2").properties('foo', 'bar').ifNotExist().create()
graph.schema().vertexLabel("T1").properties('foo', 'bar').ifNotExist().create()
graph.schema().vertexLabel("T2").properties('foo', 'bar').ifNotExist().create()
graph.schema().edgeLabel("link").link('S1', 'T1').link('S2', 'T2').properties('foo').ifNotExist().create()
Specifications of environment 环境信息
- hugegraph version: v0.10.4
- operating system: Ubuntu 18.04.3 LTS
- hugegraph backend: RocksDB
Yes, we can't support this feature, but we plan to implement it through vertex-label inheritance #447 and edge-label semantic extension #745. Currently please use multiple edge-labels for each relationship.
Due to the lack of activity, the current issue is marked as stale and will be closed after 20 days, any update will remove the stale label