Hibernate @Version annotation
问题 What is the relation between hibernate @version and ManyToOne Mapping. Assume that i am having two tables Department and Employee. Here is Deparment is the master table and Employee in the detail table. In the Employee table, departmentID is reference as foreign key. Here is my classes Public class Department { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private long ID; @Version private Long version; //Getters and Setters } public class Employee { @Id @GeneratedValue(strategy =