登陸進(jìn)去提示500錯(cuò)誤
HQL 代碼敲完 ?然后執(zhí)行查詢(xún)的方法
package?com.muke.dao.Impl; import?java.util.List; import?org.springframework.orm.hibernate3.support.HibernateDaoSupport; import?com.muke.dao.sshDao; import?com.muke.domain.User; public?class?sshDaoImpl?extends?HibernateDaoSupport?implements?sshDao?{ ???? @Override public?boolean?verify(User?user)?{ String?hql="from?user?where?username=???and?pwd=???"; ?List<User>?list=this.getHibernateTemplate().find(hql,?user.getUsername(),user.getPwd()); ?if(list.size()>0){ ?return?list.size()>0; ?}else{ ?return?false; ?} ? } }
2017-06-21
我的也是500錯(cuò)誤,org.springframework.orm.hibernate3.HibernateQueryException: Expected positional parameter count: 2, actual parameters: [com.employee.entity.Employee@6350ed68] [from Department where username = ? and password = ?]; nested exception is org.hibernate.QueryException: Expected positional parameter count: 2, actual parameters: [com.employee.entity.Employee@6350ed68] [from Department where username = ? and password = ?],這是什么原因?
2017-04-18
已經(jīng)決解了原來(lái) ?HQL 語(yǔ)句哪里的from 后面的不是表明 而是實(shí)體類(lèi)類(lèi)名