Cedric Thiebault
Cedric Thiebault

Reputation: 1025

Neo4J and timestamps

I need information about node's creation & last modification dates...

Is there a way to automatically handle created and updated properties for a node?

Hibernate offers @Version for updated field. Is there something similar with Node4J.

I found http://neo4j.rubyforge.org/classes/Neo4j/Rails/Timestamps.html but it seems to be only available for Ruby.

Upvotes: 0

Views: 526

Answers (1)

tstorms
tstorms

Reputation: 5001

You can use annotations form the spring-data-commons library. Use @CreatedDate and @LastModifiedDate on properties of type Long. Make sure you're using the simple mapping mode. For now, advanced mapping mode does not support this, see DATAGRAPH-335.

Upvotes: 2

Related Questions