【发布时间】:2016-10-12 13:17:33
【问题描述】:
我有以下图形定义。
schema.propertyKey("ID").text().create()
schema.vertexLabel("Student").properties("ID").create()
当我执行以下 Gremlin 查询时,会创建一个新顶点。
g.addV(label, 'Student').property('ID', '1234')
当我再次执行它时,已经创建了具有相同 ID 的新顶点。我正在寻找一种方法来使 ID 值唯一。这意味着当我尝试添加具有相同 ID(1234)的新学生时,我应该得到错误。对此高度赞赏的任何帮助。
【问题讨论】:
标签: unique graph-databases datastax-enterprise titan gremlin