如何在Orientdb中使Edge唯一.
我提出的解决方案:
但这并不好.Edge没有任何属性.
例:
create edge is_friend from #12:0 to #12:3
Run Code Online (Sandbox Code Playgroud)
如果我再次调用它,应该有一个错误,比如当你创建一个唯一索引时.
谢谢

在Edge out和in字段中创建约束.欲获得更多信息:
http://www.orientechnologies.com/docs/last/orientdb.wiki/Graph-Schema.html#constraints
在你的情况下试试这个:
CREATE INDEX UniqueEdges ON is_friend (out, in) unique
Run Code Online (Sandbox Code Playgroud)