[英]Spring Data Neo4j 4.0.0: Can't Create Relationship Between Nodes with the Same Label
[英]neo4j - can we create the multiple relationship between same nodes with same relationship type but with different values?
我們正在努力實現類似的目標-但我僅在下面列舉一個一般示例:
是否可以創建這樣的方案? 因為當我嘗試添加第二行時,它不會添加任何內容。
謝謝,Pk!
當然有可能。 您沒有提供確切的Cypher查詢,因此不清楚您出錯的地方。
但是,這是一個有效的示例(假設數據庫已經包含那些Actor
和Movie
節點):
MATCH (a:Actor {name: 'Keanu Reeves'}), (m:Movie {title: 'The Matrix'})
CREATE
(a)-[r1:ACT_IN {role:'main actor'}]->(m),
(a)-[r2:ACT_IN {role:'side actor'}]->(m);
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.