How do I create multiple relations within one request? The following sample request results in the following error: Neo.ClientError.Statement.InvalidSyntax","message":"WITH is required between CREATE UNIQUE and MATCH (line 1, column 281) Endpoint: Transactional Cypher HTTP endpoint http://localhost:7474/db/data/transaction/commit
Request:
{"statements":[{"statement":"
MATCH (nA0:Test{name:'Test B'}), (nB0:Test{name:'Test A'})
CREATE UNIQUE (nA0)-[r:has_parent]->(nB0)
MATCH(nA1:Test{name:'Test C'}), (nB1:Test{name:'Test A'})
CREATE UNIQUE (nA1)-[r:has_parent]->(nB1)"}]}
It works if I submit only one MATCH ... CREATE UNIQUE Statement, is a specific delimiter required?
Thanks a lot!
Edit: Grouping the statements into a single MATCH and CREATE UNIQUE works, but a seperation of the statements would be more suitable for my pupose.
{"statements":[{"statement":" MATCH(nSrc0:Test{name:'Test B'}),(nTrgt0:Test{name:'Test A'}),(nSrc1:Test{name:'Test C'}),(nTrgt1:Test{name:'Test A'}) CREATE UNIQUE (nSrc0)-[r0:has_parent]->(nTrgt0), (nSrc1)-[r1:has_parent]->(nTrgt1)"}]}