Exactly one relationship type must be specified for CREATE - Example
Closed this issue · 1 comments
rahultongia commented
Hi, I am running your example with 1.0.3 version, I am getting the following error while running the query:
api.query("MATCH (a:person), (b:person) WHERE (a.name = 'roi' AND b.name='amit') CREATE (a)-[knows]->(a)")
Error:
Exactly one relationship type must be specified for CREATE
xffighting commented
I think the query should be:
api.query("MATCH (a:person), (b:person) WHERE (a.name = 'roi' AND b.name='amit') CREATE (a)-[:knows]->(b)")
Change the [knows] to [:knows] by adding the ":“ before the relationship, and change the last (a) to (b), otherwise this query won't make any sense.