0
votes

I'm trying to create a relationship between a node that has a child node with a property value that matches the name of it's grandparent.

I'm running the following cypher against Neo4j 2.0.0-M06.

match (l:Transformer),(m:Asset)-[:HAS_PARENT]-(n:Attribute)
where n.Name = "Transformer"
and n.Value = l.Name
create (m)-[:HAS_PARENT_TRANSFORMER]->(l)

It's crashing with an unknown error. All that's in the message log :

2014-01-09 22:46:21.226+0000 WARN [o.n.k.EmbeddedGraphDatabase]: GC Monitor: Application threads blocked for an additional 334ms [total block time: 0.334s]

1

1 Answers

0
votes

Probably first of all update to 2.0.0

then you can also try this:

match (l:Transformer)
WITH l.Name as Name
MATCH (m:Asset)-[:HAS_PARENT]-(n:Attribute)
where n.Name = "Transformer"
and n.Value = Name
create (m)-[:HAS_PARENT_TRANSFORMER]->(l)