Merge 会将 Name 更新为 Manik 或 Ankit ?
Student s1 = null;
s1 = (Student)session1.get(Student.class, new Integer(101));
session1.close();
s1.setName("Manik");
Session session2 = factory.openSession();
Student s2 = null;
Object o1 = session2.get(Student.class, new Integer(101));
s2 = (Student)o1;
s2.setName("Ankit");
Transaction tx=session2.beginTransaction();
session2.merge(s1);