title: @Version not incremented
body: <p>Here is my simple entity:</p>
  
  <pre><code>import javax.persistence.Version;
  @Entity
  @Table(name="orders")
  public class Order implements Serializable {
      @Version
      @Column(name="version")
      private Long version;
  
      @Version
      public Long getVersion() {
          return version;
      }
      @Version
      public void setVersion(Long version) {
          this.version = version;
      }
  }
  </code></pre>
  
  <p>I added @Column and @Version to getter and setter because it is not working. The version in the mysql database was initially null and then 0. When I do a </p>
  
  <pre><code>order = em.merge(order);
  </code></pre>
  
  <p>the version is NOT incremented. Why? I hoped that the version is incremented automatically during merge and to get an javax.persistence.OptimisticLockException when the version does not match. Do I need something like @Lock(LockModeType.OPTIMISTIC_FORCE_INCREMENT)?</p>
  
  <p>Also, what is org.springframework.data.annotation.Version? Should I use that? What does it do?</p>
  
  <p>I am using spring boot 1.5.3. </p>