Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Since Spring Data Neo4j 2.2, we can use the AuditingEventListener for the auditing of entities. Spring Data 1.5 offers the <a href="http://static.springsource.org/spring-data/commons/docs/current/api/org/springframework/data/annotation/CreatedDate.html" rel="nofollow noreferrer">@CreatedDate</a>, <a href="http://static.springsource.org/spring-data/commons/docs/current/api/org/springframework/data/annotation/CreatedBy.html" rel="nofollow noreferrer">@CreatedBy</a>, <a href="http://static.springsource.org/spring-data/commons/docs/current/api/org/springframework/data/annotation/LastModifiedDate.html" rel="nofollow noreferrer">@LastModifiedDate</a> and <a href="http://static.springsource.org/spring-data/commons/docs/current/api/org/springframework/data/annotation/LastModifiedBy.html" rel="nofollow noreferrer">@LastModifiedBy</a> annotations. You can use them as follows:</p> <pre><code>@NodeEntity public class Entity { @GraphId private Long id; @CreatedDate private Long date; } </code></pre> <p>Make sure to configure the AuditingEventListener:</p> <pre><code>@Configuration("db") @EnableNeo4jRepositories(basePackages = { "your.package" }) @EnableTransactionManagement public class DatabaseSpringConfiguration extends Neo4jConfiguration { @Bean(destroyMethod = "shutdown") public EmbeddedGraphDatabase graphDatabaseService() { return new EmbeddedGraphDatabase("data/neo4j.db"); } @Bean public AuditingEventListener auditingEventListener() throws Exception { return new AuditingEventListener(new IsNewAwareAuditingHandler&lt;Object&gt;(isNewStrategyFactory())); } } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload