title: Spring Data MongoDB - Annotation @CreatedDate does not work while using with custom Id field
body: <p>I have a simple Persistable Class:</p>
  
  <pre><code>public class Profile implements Persistable&lt;String&gt;{
  
      @Id
      private String username;
  
      @CreatedDate
      public Date createdDate;
  
      public Profile(String username) {
          this.username = username;
      }
  
      @Override
      public String getId() {
          return username;
      }
  
      @Override
      public boolean isNew() {
          return username == null;
      }
  }
  </code></pre>
  
  <p>And a simple repository:</p>
  
  <pre><code>public interface ProfileRepository extends MongoRepository&lt;Profile, String&gt; {
  
  }
  </code></pre>
  
  <p><strong>My Spring Boot Application class is also annotated with @EnableMongoAuditing.</strong> But i still can't get the annotation @CreatedDate work. </p>
  
  <p>ProfileRepository.save(new Profile("user1")) writes the entity without the field createdDate. What do i do wrong?</p>
  
  <p><strong>EDIT:</strong> This is my Application class (without @EnableMongoRepositories, but it works since the repositories are in the sub-packages i guess)</p>
  
  <pre><code>@SpringBootApplication
  @EnableMongoAuditing
  public class Application {
  
      public static void main(String[] args) throws Exception {
          SpringApplication.run(Application.class, args);
      }
  }
  </code></pre>
  
  <p><strong>EDIT:</strong> Also adding the annotation EnableMongoRepositories did not change anything.</p>