title: Spring Data JPA: Mark entity as dirty to increase @Version
body: <p>I am looking for a way to mark an entity as dirty with Spring Data JPA even though no attribute has changed. My goal is that the entity's version (as per <code>@Version</code>) is increased and my auditing attributes (<code>@LastModifiedBy</code> etc) are updated.</p>
  
  <p>There seems to be something like this for JDO (<code>JDOHelper.makeDirty</code>) and maybe even <code>EntityManager.lock()</code>, but I couldn't find any way to do this with Spring Data JPA. Any pointers?</p>