Neo4j 3.5.6 Desktop, Windows 10.
I'm trying to re-create the database described here: https://dzone.com/articles/neo4j-and-virtual-nodesrelationships.
The code in GitHub (https://github.com/scsosna99/lobbying-filings) uses a custom Java importer to import XML, but I want to use the standard XML import (apoc.load.xml) to do the same.
Here's an example of one of the XML files: https://gist.github.com/derekmcloughlin/df75a0b83919a485fb11d8b720968766
The code is here: https://gist.github.com/derekmcloughlin/65e66e97ac35b7d2f46c96620c683298, and works except for the bit where I want to create the :ENGAGES and :EMPLOYS relationships.
How do I create the relationship between Registrant and Lobbyist?
The part that's failing is between lines 32 and 35
with filing, f, item, clients, registrants, lobbyists, governmentEntities, issues match(r)-[:FILED]->(f) match(lo)-[:LOBBYING_FOR]->(f) create(r)-[:EMPLOYS]->(lo)
It's creating a cartesian product instead of the relationships I want for each individual filing.
Any pointers would be appreciated.