cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Neo4j Windows desktop. version Version: 1.3.4
I created [ bom2.cypher ] DB from here:
(Bill of Materials sample data · GitHub)

Then I ran cypher from here Bill of Materials in Neo4j – Max De Marzi
MATCH path = (t:Part {id:"120-001"})<-[:BELONGS_TO*0..]-(:Part)
WHERE last(nodes(path)).cost is null
WITH t, last(nodes(path)) AS missing_cost
WITH t, missing_cost, SIZE(COLLECT(missing_cost)) AS need_cost
MATCH path = (missing_cost)<-[:BELONGS_TO*0..]-(p:Part)
WITH t, missing_cost, need_cost, COLLECT(DISTINCT p) AS parts
WHERE SINGLE(x IN parts WHERE COALESCE(x.cost, x.part_cost) IS NULL)
MATCH (missing_cost)<-[r:BELONGS_TO]-(p:Part)
WITH missing_cost, SUM(r.qty * COALESCE(p.cost, p.part_cost)) AS part_cost
WHERE missing_cost.part_cost is NULL
SET missing_cost.part_cost = part_cost

Nothing happened.
Run again and again. Nothing
I added PROFILE before the first MATCH and the command ran and the "set" at the end worked.
What is the reason?