Java – JPA – @Version annotation

But still I am not sure how it works? Let’s say an entity MyEntity has an annotated version property: @Entity public class MyEntity implements Serializable { @Id @GeneratedValue private Long id; private String name; @Version private Long version; //… } On update, the field annotated with @Version will be incremented and added to the WHERE … Read more