How to delete the unmodifiable vertex which has no edges in gremlin?

时光怂恿深爱的人放手 提交于 2019-12-11 14:46:52

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!