The following query:
MERGE (resources:Entity {id: '#resources'})
MERGE (dc1:Component {id: 'DocumentChildOf'})
ON MATCH SET dc1.value = '{v1}'
ON CREATE SET dc1.value = '{v1}'
MERGE (dc1)-[:ATTACHED_TO]->(resources)
MERGE (artwork:Entity {id: '#artwork'})
MERGE (dc2:Component {id: 'DocumentChildOf'})
ON MATCH SET dc2.value = '{v2}'
ON CREATE SET dc2.value = '{v2}'
MERGE (dc2)-[:ATTACHED_TO]->(artwork)
Produces the following graph:
My intention was that both #artwork and #resources nodes have a DocumentChildOf node as is shown in the following graph.
Somehow the relationships are matching more broadly than I would think. How can I modify the query to get the desired results?