Reputation: 51
I'd like to set a different style/color for relationships in my database that have the property "critical". I assume to do this, I need to update the relationships with a new label called "isCrit" and modify the grass file.
Can anyone help with selecting all relationships with a particular property and create the new label "isCrit"?
Fairly new to neo4j
Upvotes: 2
Views: 3218
Reputation: 16375
Can anyone help with selecting all relationships with a particular property and create the new label "isCrit"?
Neo4j relationships do not have labels. Labels are part of nodes. They can hold more than one label. Relationships have a relationship type. Take a look in the docs about relationships.
Also, relationships can have only one type. This way you cannot add another relationship type to a given relationship. Moreover, currently has no way to change the relationship type. In the cases that you want to change the relationship type you should delete the current relationship and create a new one with the desired type, as described in this answer:
MATCH (n:User {name:"foo"})-[r:REL]->(m:User {name:"bar"})
CREATE (n)-[r2:NEWREL]->(m)
// copy properties, if necessary
SET r2 = r
WITH r
DELETE r
Upvotes: 1