incubator-hugegraph icon indicating copy to clipboard operation
incubator-hugegraph copied to clipboard

能在现有的节点上新增新的属性吗

Open wslovenide opened this issue 7 years ago • 2 comments

怎么在已有的节点上添加新的属性字段?

wslovenide avatar Aug 15 '19 04:08 wslovenide

先给该顶点的vertexlabel添加属性,然后获取到该顶点,执行更新属性操作即可。

示例,为已存在的某个person类型顶点添加新的属性xxx。

schema.vertexLabel("person").properties("xxx").append();

g.V('vid').property('xxx', 'value');

Linary avatar Aug 19 '19 12:08 Linary

我在网页上执行: schema.vertexLabel("person").properties("xxx").append(); 报错: Error! No such property: schema for class: Script113

难道上面那个脚本不是在网页上执行的吗?

wslovenide avatar Aug 20 '19 03:08 wslovenide