title: Spring Data @CreatedDate annotation doesn't work for me
body: <p>I am working on project where I use Spring Data. I wanted to fill in <code>creationTime</code> field using <code>@CreatedDate</code> annotation instead using method with <code>@PreUpdate</code> or <code>@PrePersist</code> annotation (doing it this way it works perfectly).  When I do it with <code>@CreatedDate</code> it just leaves this field blank. I use postgresql database. <a href="http://docs.spring.io/spring-data/jpa/docs/current/reference/htmlsingle/#jpa.auditing" rel="noreferrer">Documentation</a> is not very helpful.</p>
  
  <p>Do you have any idea how can I fix it? Thank you! </p>
  
  <pre><code>import org.springframework.data.annotation.CreatedDate;
  @Entity
  @Table(name = "software")
  public class Software implements Serializable {
  
      // ...
  
      @Column(name = "creation_time")
      @CreatedDate
      private Date creationTime;
      //...
  }
  </code></pre>
  
  <p>My <code>applicationContext</code>:</p>
  
  <pre><code>&lt;jpa:repositories base-package="path.to.dao"/&gt;
  
  
  &lt;context:component-scan base-package="path.to.dao"/&gt;
  &lt;context:property-placeholder location="classpath:application.properties"/&gt;
  
  
  &lt;bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource"&gt;
      &lt;property name="driverClassName" value="${db.driver}"/&gt;
      &lt;property name="url" value="${db.url}"/&gt;
      &lt;property name="username" value="${db.username}"/&gt;
      &lt;property name="password" value="${db.password}"/&gt;
  &lt;/bean&gt;
  
  &lt;bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean"&gt;
      &lt;property name="packagesToScan" value="path.to.bean"/&gt;
      &lt;property name="dataSource" ref="dataSource"/&gt;
      &lt;property name="jpaVendorAdapter" ref="jpaAdapter"/&gt;
      &lt;property name="jpaProperties"&gt;
          &lt;props&gt;
              &lt;prop key="hibernate.dialect"&gt;${hibernate.dialect}&lt;/prop&gt;
              &lt;prop key="hibernate.show_sql"&gt;${hibernate.show_sql}&lt;/prop&gt;
              &lt;prop key="hibernate.format_sql"&gt;${hibernate.format_sql}&lt;/prop&gt;
              &lt;prop key="hibernate.ejb.naming_strategy"&gt;${hibernate.ejb.naming_strategy}&lt;/prop&gt;
              &lt;prop key="hibernate.hbm2ddl.auto"&gt;${hibernate.hbm2ddl.auto}&lt;/prop&gt;
          &lt;/props&gt;
      &lt;/property&gt;
  &lt;/bean&gt;
  
  &lt;bean id="jpaAdapter" class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter"/&gt;
  
  &lt;bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager"&gt;
      &lt;property name="entityManagerFactory" ref="entityManagerFactory"/&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p></p>