Positional parameter does not exist: 2 in query

List<Employee> list=sf.getCurrentSession().createQuery(hql).setString(1,e.getId()).setString(2, e.getPw()).list();中将setString部分改为 List<Employee> list=sf.getCurrentSession().createQuery(hql).setString(0,e.getId()).setString(1, e.getPw()).list();

你可能感兴趣的:(Positional parameter does not exist: 2 in query)