[英]Getting Error "not spawned anonymously - use the __ class rather than a TraversalSource " while adding or updating the edge(in Neptune using gremlin)
我正在使用 Amazon Neptune 引擎版本 1.1.1.0,我正在嘗試執行以下查詢
gE().has(id, '6529056485837422516').fold().coalesce(unfold().property('id','6529056485837422516').property('createdat', 1553676114).property('status', 0).property('edgeproperty', 'connects').property('source', '63').property('destination', '54'),gV('54').addE('connects').to(__.V('63')).property(id,'6529056485837422516').property('id','6529056485837422516').property('createdat', 1553676114).property('status', 0).property('edgeproperty', 'connects').property('source', '63').property('destination', '54'))
我正在從我的 gremlin 控制台執行此查詢,執行此查詢后出現如下錯誤{"detailedMessage":"The child traversal of [GraphStep(vertex,[54]), AddEdgeStep({label=[connects], createdat= [1553676114], edgeproperty=[connects], ~to=[[GraphStep(vertex,[63])], destination=[54], id=[6529056485837422516], id=[6529056485837422516], 源=[63], status=[0]})] 不是匿名生成的 - 使用 __ class 而不是 TraversalSource 來構造子遍歷","code":"InternalFailureException","requestId":"ceee889e-c382-4bde-ad91-86ea1cb010c1 “}
但是,如果我使用以下查詢分別添加邊緣,那么我可以添加邊緣gV('54').addE('connects').to(__.V('63')).property(id,'6529056485837422516').property('id','6529056485837422516').property('createdat', 1553676114).property('status', 0).property('edgeproperty', 'connects').property('source', '63').property('destination', '54')
即使我能夠使用以下查詢更新邊緣,我也能夠更新gE().has(id, '6529056485837422516').fold().coalesce(unfold().property('id','6529056485837422516').property('createdat', 1553676114).property('status', 0).property('edgeproperty', 'connects').property('source', '63').property('destination', '54'))
但是如果我試圖通過使用 fold() 來同時更新或添加。 coalesce() 然后我收到錯誤,因為不是匿名生成的 - 使用 __ class 而不是 TraversalSource 。
請幫我解決這個錯誤
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.