1
@Test public void testUpdate7() { Session session = sessionFactory.getCurrentSession(); session.beginTransaction(); // Query q = session.createQuery("update Student s set s.name='z5' where s.id = 1"); Query q = session.createQuery("update Student s set s.name='z5' where s.id = 1"); q.executeUpdate(); session.getTransaction().commit(); }