neo4jcyphergrass

Neo4j - How to create a relationship with no null relationship name


I want to create relationship among nodes which will have no Relationship Name.

I Have been trying this :

LOAD CSV WITH HEADERS FROM 
"file:///trace_function_ec_souscription.csv" AS line
MERGE (entity1:Entity{name:line.Parent_Method_Name})
MERGE (entity2:Entity{name:line.Package_Name})
MERGE (entity1)-[]->(entity2)

So the relationship will have no Name. But I am getting this following error:

Neo.ClientError.Statement.SyntaxError: Exactly one relationship type must be specified for MERGE. Did you forget to prefix your relationship type with a ':'? (line 5, column 16 (offset: 196)) "MERGE (entity1)-[]->(entity2)"

If this is not possible, is it possible to remove the relationship name while fetching the graph? Only Arrow sign will be there!

And One more thing can i make the arrow head(>) a little more bigger than the default one?

Any help on this would be highly appreciated.

Thanks in advance!


Solution

  • I have been able to achieve this using:

    LOAD CSV WITH HEADERS FROM 
    "file:///trace_function_ec_souscription.csv" AS line
    MERGE (entity1:Entity{name:line.Parent_Method_Name})
    MERGE (entity2:Entity{name:line.Package_Name})
    MERGE (entity1)-[:` `]->(entity2)
    

    -So it is basically showing nothing.