日期:2014-05-19 浏览次数:20776 次
Administrator administrator = new Administrator(); administrator.setAdminname("leomn"); Query query = session.createQuery("from Administrator where adminname=:name"); query.setParameter("name",administrator.getAdminname());
Query query = session.createQuery("from Administrator where adminname='leomn'");
Query query = session.createQuery("from Administrator as a where a.adminname=:name"); query.setParameter("name",administrator.getAdminname());