Create a vertex with Label in Gremlin

936 views Asked by At

This seems like a must have feature for graph query language, but I cannot find a command that let me create a vertex with label, nor add a label after a vertex has been created.

I tried the solution here, but it does not work because the property T.label is not recognized.

I am using OrientDB as the db engine, and OrientDB has class hierarchy concept rather than Label concept, and I wonder if that is the problem.

1

There are 1 answers

0
Khanetor On BEST ANSWER

I missed it in the tutorial here

You can use g.addVertex("class:className")