问题
Unfortunately, I have three provides in my application. when I used two different providers which are having same email then there is another vertex got created with new id in the graph. Providers issue got solved.But, now I want to delete that newly created vertex. I have tried
g.V('Persona').has('personaId','personaId').drop()
But it is saying that,
Cannot modify unmodifiable vertex: v[73732348]
回答1:
My answer might not quite solve your problem, but I will just point out that the error you are seeing is JanusGraph specific. I don't know what it signifies offhand. I do note though that your Gremlin of:
g.V('Persona').has('personaId','personaId').drop()
could be wrong, only in the sense that it's saying: 'Find a vertex with the T.id
of "Persona" and then filter that by the key "personaId" and the value "personaId"'. To my knowledge JanusGraph would not allow for vertex identifier of "Persona" so I'm wondering if that is instead meant to be a label? Should you instead be doing:
g.V().has('Persona','personaId','personaId').drop()
It could be possible that vertex validation methods in JanusGraph are generating this "unmodifiable vertex" error.
来源:https://stackoverflow.com/questions/58690223/how-to-delete-the-unmodifiable-vertex-which-has-no-edges-in-gremlin