1
votes

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
T.label is only supported starting from gremlin 3, afaik. What gremlin version do you use?Faber
It comes with OrientDB 2. I suppose it is 2.6.Khanetor
I guess you could simply add a property with key label to each vertex. You should still be able to query vertices by the property 'label' efficiently given the label is indexed.Faber

1 Answers

1
votes

I missed it in the tutorial here

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