Lets say, I have an user:
CREATE (n { name: 'Tamil' })
and 2 roles:
CREATE (n { name: 'developer' } )
CREATE (n { name: 'tester' } )
Then, I make relationship between the user & each of the 2 roles.
CYPHER 1.9 START a = node(*), b = node(*)
WHERE a.name = 'Tamil' AND b.name = 'developer'
CREATE (a)-[r:HAS_ROLE]->(b)
RETURN r
CYPHER 1.9 START a = node(*), b = node(*)
WHERE a.name = 'Tamil' AND b.name = 'tester'
CREATE (a)-[r:HAS_ROLE]->(b)
RETURN r
Now, I want to remove tester role relationship from the user. I tried:
CYPHER 1.9 START a = node:node_auto_index('name:Tamil')
MATCH a-[r:HAS_ROLE]-()
RETURN r
But, it returns both of the relationships. I know that i can attach property with relationships. But, again, I don't know the cypher syntax for that.
I am new to Neo4j. Any suggestions would be really great!
Thanks!