I have node user and node post. So user can either like or dislike that post. When he likes post i create LIKED relationship between user and post, but if user then dislike it i will create DISLIKE relationship but LIKED still remains. How can i create one relationship and delete other one?
This is my query:
MATCH (user:User), (post:Post) WHERE user.username = '...' and post.id = '...' MEREGE (user)-[liked:LIKED]->(post) ON CREATE liked SET liked.time = '...'
Thank you in front guys :)