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」