标签:
Session session = factory.openSession(); session.beginTransaction(); Query query = session.createQuery("from Student s where s.id=?"); query.setString(0, "2"); Student student = (Student)query.uniqueResult();
标签:
原文地址:http://www.cnblogs.com/ph123/p/5692538.html