0
votes

Is it possible to create multiple relationships of the same type with different properties between two nodes?

For example: for a movie with a double role:

Actor--acts{charactername : "hank"}--> movie.

and also the same actor, does another character in the same movie say, FRED

Actor-- acts{ charactername: "Fred"}-->Movie

.

Is there a way to do so using Cypher? I am using the REST API, Neo4j 2.0.2.

1

1 Answers

0
votes

Multiple of relations of the same type with or without different properties are allowed between two nodes.

This Cypher statement will create acts relations for all character names passed in:

MATCH (actor:Actor {id:3}),(movie:Movie { id:4})
FOREACH (character IN ['Hank', 'Fred']| 
         CREATE actor-[:acts { charactername:character }]->movie)