Uploaded image for project: 'Spring Data Neo4j'
  1. Spring Data Neo4j
  2. DATAGRAPH-335

No ApplicationEvent in advanced mapping mode

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Trivial
    • Resolution: Won't Fix
    • Affects Version/s: 2.2
    • Fix Version/s: None
    • Component/s: CORE
    • Labels:
      None
    • Environment:
      <spring.version>3.2.1.RELEASE</spring.version>
      <spring.data.neo4j.version>2.2.0.RELEASE</spring.data.neo4j.version>
      <neo4j.version>1.9.M04</neo4j.version>

      Description

      No BeforeSaveEvent, AfterSaveEvent and DeleteEvent are sent when NodeBacked entities are used. This is also the case when related entities are cascaded (create and update).

      The AuditingEventListener isn't triggered because of this, thus e.g. @CreatedDate can't be used on entity fields.

      @Configuration("db")
      @EnableNeo4jRepositories(basePackages = { "com....repository" })
      @EnableTransactionManagement(mode = AdviceMode.ASPECTJ)
      @Profile(SpringProfile.COMMON)
      public class DatabaseSpringConfiguration extends Neo4jAspectConfiguration {
      
          @Bean
          public AuditingEventListener auditingEventListener() throws Exception {
              return new AuditingEventListener(new IsNewAwareAuditingHandler<Object>(isNewStrategyFactory()));
          }
      }
      

        Attachments

          Activity

            People

            • Assignee:
              mhunger Michael Hunger
              Reporter:
              tims83 Timmy Storms
              Last updater:
              Nicolas Mervaillie
            • Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: