日期:2014-05-20 浏览次数:20783 次
String hql="from Cangku c , Materiel m where c.materielid = m.id"; List l=hd.query(hql); System.out.println(l.size()); req.setAttribute("l",l); return "success";
public List sqlquery(String sql){ Session session = creatsession(); Query q=session.createSQLQuery(sql); session.getTransaction().commit(); return q.list(); }