title: MongoDb auditing is not working
body: <p>I'm using Spring Data MongoDb for backend storage and want to enable mongo auditing and it doesn't work not sure why.</p>
  
  <p>I have next configuration:</p>
  
  <pre><code>@Configuration
  @EnableMongoRepositories(basePackages = {"base.package"})
  @EnableMongoAuditing
  public class DomainConfig {
  
  }
  </code></pre>
  
  <p>And I have few entities that extend my base class:</p>
  
  <pre><code>@Getter
  public class Entity implements Persitable {
  
      @Id
      @Setter
      protected String id;
  
      @CreatedDate
      @Setter
      protected Long creationTime;
  
      @LastModifiedDate
      protected Long modificationTime;
  
      @Version
      @Setter
      protected Long version;
  
      @JsonIgnore
      public boolean isNew() {
          return `getVersion() == 0` &amp;&amp; getCreationTime() == null;
      }
  }
  </code></pre>
  
  <p>But when I'm calling <code>entityRepository.save(entity)</code> I'm getting <code>NullPointerException</code> on line with <code>getVersion() == 0</code> and <code>getVersion()</code> returns <code>null</code> but I think it should return <code>0</code>.</p>
  
  <p>What could be the problem here?</p>
  
  <p>Btw: I'm using Spring Data MongoDb 1.5.2.RELEASE version</p>