title: JPA @Version: how to use it?
body: <pre><code>@Entity
  public class Person {
      @Id
      @GeneratedValue(strategy=GenerationType.IDENTITY)
      private Long id;
  
      private int salary;
  
      @Version
      private long version;
  
      // ...getters and setters
  }
  </code></pre>
  
  <ol>
  <li>Is it required to create setter/getter for <code>version</code>?</li>
  <li>When persisting this entity with Hibernate, I don't need to set this value manually, right?</li>
  <li>What else do I need to configure in order to use optimistic concurrency checking with Spring's <code>hibernateTemplate.saveOrUpdate</code>? Are all databases supported?</li>
  <li>How to unit-test this entity? In my database all my records showing version field have value of 0</li>
  <li>Will calling <code>hibernateTemplate.saveOrUpdate</code> increment the version value every time?</li>
  </ol>