'Neo4j Browser - Bug on create node?
I dont know if it cpuld be an issue/bug.
When you create a node without variable, server creates "zombie gray" nodes
Example: CREATE (Expedient {id_exp: 'MAPSAN_0004', name: 'contractual', dateCreation: '16/03/2022', dateExpiration:'16/03/2023'}) and run it 2 o 3 times.
You will see in console result for each command: Created 1 node, set 4 properties, completed after 2 ms.
But when you want to match the nodes, per example: MATCH (e:Expedient) RETURN e you will not find de "zombie" nodes, only if run: MATCH (e) RETURN e
you will see all nodes.
Is it a good behaviour? Thx in advance community!
Solution 1:[1]
You are almost there, just missing a colon to define the node label.
CREATE (:Expedient
{id_exp: 'MAPSAN_0004', name: 'contractual', dateCreation: '16/03/2022', dateExpiration:'16/03/2023'})
If you don't include the colon, the Cypher treats it as a reference variable that you could refer to later in the same statement:
CREATE (e:Expedient {id_exp: 'MAPSAN_0004', name: 'contractual', dateCreation: '16/03/2022', dateExpiration:'16/03/2023'})
CREATE (e)-[:REL]->(:Node)
Another thing, you might want to store the dates as date format and not string.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Tomaž BrataniÄ |
