0
添加触发器我创建了apoc.trigger.add触发:不能创建关系时的Neo4j
CALL apoc.trigger.add('increase_followings_and_followers',
'UNWIND {createdRelationships} AS rel
WITH rel, STARTNODE(rel) as follower, ENDNODE(rel) AS followed WITH rel, follower, followed
WHERE TYPE(rel)="FOLLOW" and labels(followed)="User" and labels(follower)="User"
SET follower.followings = follower.followings +1, followed.followers= followed.followers+1',
{phase:'after'})
我建立一个socialnetwork,当用户跟随另一个,触发会自动增加追随者数量和以下数。但它不工作,我不能创建两个用户点之间新的关系“FOLLLOW”