Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
03-27-2022 11:38 AM
Running community edition 4.3.2 on Ubuntu 20.04
Hi all,
I have the following question:
How can I duplicate a node, in a new node with another name, but maintaining all the properties?
Or, in orhet word, how can I duplicate the name changing the name of the node?
Example:
MATCH (p:Person)
CREATE (n:Node)
SET n = {p}
Solved! Go to Solution.
03-27-2022 12:26 PM
This seems to work. It creates the new node will all the properties of the existing node, then overwrites a property (or more if you want, or add new ones).
match(n:Test{id:100})
with n
create (m:Test)
set m = n
set m.name = 'new name'
return m
03-27-2022 12:26 PM
This seems to work. It creates the new node will all the properties of the existing node, then overwrites a property (or more if you want, or add new ones).
match(n:Test{id:100})
with n
create (m:Test)
set m = n
set m.name = 'new name'
return m
All the sessions of the conference are now available online