title: Spring Data fills @LastModifiedDate by not @CreatedDate
body: <p>I have following Spring Boot sample application.
  The crazy thing is if I add <code>@EnableMongoAuditing</code> annotation on SampleApplication bean, <code>lastModifiedDate</code> would be filled by <code>createDate</code> would not. Why is that? I searched the web and many people had problems on emptying <code>createDate</code> during an update, but I don't have an update.</p>
  
  <p>Document class:</p>
  
  <pre><code>@Document
  public class SampleBean implements Persistable&lt;String&gt; {
  
      @Id
      public String id;
      @CreatedDate
      public LocalDateTime createDate;
      @LastModifiedDate
      public LocalDateTime lastModifiedDate;
  
      public String name;
  
      @Override
      public String getId() {
          return id;
      }
  
      @Override
      public boolean isNew() {
          return id != null;
      }
  }
  </code></pre>
  
  <p>Repository Interface:</p>
  
  <pre><code>@Repository
  public interface SampleBeanRepository extends MongoRepository&lt;SampleBean, String&gt; {
  }
  </code></pre>
  
  <p>Rest Controller:</p>
  
  <pre><code>@RestController
  public class WebService {
  
      @Autowired
      private SampleBeanRepository repository;
  
      @RequestMapping("/insert")
      public String insert() {
          SampleBean sampleBean = new SampleBean();
          sampleBean.name = "Prefix" + new Random().nextInt(1000);
          repository.insert(sampleBean);
          return "done";
      }
  
      @RequestMapping("/")
      public Collection&lt;SampleBean&gt; home() {
          return repository.findAll();
      }
  
  }
  </code></pre>
  
  <p>Application Config:</p>
  
  <pre><code>@SpringBootApplication
  @EnableMongoAuditing
  public class ApplicationConfig {
  
      public static void main(String[] args) {
          SpringApplication.run(ApplicationConfig.class, args);
      }
  }
  </code></pre>