Update timestamp when Node property is modified

Hi

I am new to Neo4j and would like help from wonderful community to figure out a way to update timestamp property every time other node properties are modified. This would allow me to query for nodes that have been modified after certain datetime value. Please provide your valuable suggestions.

Thanks
Vinay

Perhaps apoc triggers can help you out?

http://neo4j-contrib.github.io/neo4j-apoc-procedures/3.5/operational/triggers/

2 Likes

If you used an APOC trigger to update the timestamp property of a node, wouldn't it trigger as another update to a property of the node thereby getting into an infinite loop?

@aldrinm you would need to confirm with one of the Neo4j / apoc engineers to be sure, but if they've implemented triggers with the same logic as most other databases (all that I've seen), then no, triggers won't trigger themselves.