[英]neo4j - can we create the multiple relationship between same nodes with same relationship type but with different values?
we are trying to achieve something similar- but i just taking a general example below: 我们正在努力实现类似的目标-但我仅在下面列举一个一般示例:
Is it possible to create such scenarios? 是否可以创建这样的方案? because when i tries to add the second row it doesn't add anything.
因为当我尝试添加第二行时,它不会添加任何内容。
Thanks, Pk! 谢谢,Pk!
It is certainly possible. 当然有可能。 You did not provide your exact Cypher queries, so it is not clear where you went wrong.
您没有提供确切的Cypher查询,因此不清楚您出错的地方。
However, here is a working example (assuming that the DB already contains those Actor
and Movie
nodes): 但是,这是一个有效的示例(假设数据库已经包含那些
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.