(nodeA)-[relation]->(nodeB),
In the above example, I want to restrict to have only one relation between instance of nodeA & nodeB.
How can this be done?
Thanks in advance.
create (role:ROLE {slug:"abc1"})
with role
match (permission:PERMISSION)
where permission.name IN ['create']
merge (role)-[:HAS_PERMISSION]->(permission)
RETURN role;
With above query I am trying to create role and its relationship with permission....
hey thanks it worked. The only thing which needs to be changed is the position of with statement.
create (role:ROLE {slug:"abc1"})
with role
call {
match (permission:PERMISSION)
where permission.name IN []
merge (role)-[:HAS_PERMISSION]->(permission)...