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.

How do I add another node:descriptor to an existing node?

All of our nodes are defined as n:ProgNode {nodetype:current, otherstuff) where n.current could be one of 20 items. I am trying to "promote" current to the node level so I have a structure like this n:ProgNode:Current or n:ProgNode:Previous which would make selection much easier.

Same with my connections. I need to have different connections depending on the use case.

Seems simple, can't get the syntax correct.

1 ACCEPTED SOLUTION

Hi @bill.dickenson,

MATCH (n:ProgNode) WHERE n.nodetype = current
WITH n
SET n:Current

and same method applies to other use cases.

View solution in original post

2 REPLIES 2

Hi @bill.dickenson,

MATCH (n:ProgNode) WHERE n.nodetype = current
WITH n
SET n:Current

and same method applies to other use cases.

if I have several node types (current happens to be one of 6) can it be a variable or do I need to code up one for each ? - Thank you for the fast answer