Hello,
I am going through the Getting Started docs and As I was trying the last Cypher example, which is:
CREATE (a:Person { name:"Tom Hanks",
born:1956 })-[r:ACTED_IN { roles: ["Forrest"]}]->(m:Movie { title:"Forrest Gump",released:1994 })
CREATE (d:Person { name:"Robert Zemeckis", born:1951 })-[:DIRECTED]->(m)
RETURN a,d,r,m
I found that the :DIRECTED
relationship is returned and displayed although it is not mentioned in the return statement.
Can anyone explain why is that?
I know that it was created because we specified that in the second CREATE
command and we didn't give it a variable.
But my question is why it has been RETURN
ed? Is that the case that whenever we RETURN
any two nodes (m and d in this example), the relationship(s) between them are being returned by default?
Thank you in advance.