0
我正在尋找任何方式將標籤從一個節點複製到另一個節點。我發現這個帖子How can we copy labels from one node to another in one cypher?。但它看起來像auther詢問簡單的方法來做到這一點。我正在尋找任何解決方案,像遍歷標籤列表。我試過這個如何將標籤從一個節點複製到另一個節點?
Create (q:Label1:G2:Label2{id: 14111, t: 99999999999999})-
[r1:CONSISTS_OF{t:99999999999999}]->
(g1:Label1:G1:Label2:Label3{t: 99999999999999, name:'name1'}),
(q)-[r221:CONSISTS_OF{t:99999999999999}]->
(g2:Label1:G1:Label2:Label4{t: 99999999999999, name:'name2'}),
(q)-[r2:CONSISTS_OF{t_end:99999999999999}]->
(g2123:Label1:G1:Label2:Label3{t_end: 99999999999999, name_ru:'name2'})
return *
Match (g2:G2)-->(g1:G1) with g1
Create (g1Instance) set g1Instance = g1
FOREACH (n IN labels(g1) | set g1Instance: n) return g1Instance
但是代替標籤(g1)它將標籤「n」設置爲g1Instance。