Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
In this tutorial:
There is the query:
MATCH (a:Person), (m:Movie)
WHERE a.name = 'Michael Caine' AND m.title = 'Batman Begins'
CREATE (a)-[:ACTED_IN]->(m)
RETURN a, m
with an explanation that this query will create a cartesian product but it does NOT explain how to avoid that!
Avoiding a cartesian product is explained here:
(I would have made a Pull Request on it, but I don't know where it lives in github.)