cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

How can I create a TRIGGER?

Hello! I just started using Neo4j.

I have a little pokemon database which I just created. Now I'd like to have a java or python code where I can define a Trigger (I guess I have to do this in external code, not with Cypher in the server browser)

2X_0_04177096973998e3d02a21372a49aab24499a2a7.png

My idea is that now, every time a new pokemon is added, the code should be checking the type of such pokemon, identify the type he is effective against, and making the relationship between that new node and the rest of the Pokemon. Is this achievable in any way? Thanks!

1 ACCEPTED SOLUTION
2 REPLIES 2

Use APOC -- it supports definition of triggers. Here are the docs.

https://neo4j-contrib.github.io/neo4j-apoc-procedures/#triggers