I'm using a framework that generates objects Node
and they already have assigned a id. Now they need to be converted to Titan vertices with the same ID controlled in the framework (accessed with node.id
)
public long addNode(Node node) {
TitanVertex vertex = (TitanVertex) g.addVertex(null);
g.commit();
vertex.setProperty(ID, node.id);
vertex.setProperty(TYPE, node.type);
vertex.setProperty(VERSION, node.version);
vertex.setProperty(TIME, node.time);
vertex.setProperty(DATA, node.data);
...
Error:
java.lang.IllegalArgumentException: Name is reserved: id
But it seems to not allow it. Should I use some fake property to imitate a secondary Id? Does Titan has some way to do that?
Thanks!