I get an error when creating Query:
'of' unexpected
My code is below:
@Override
public Admin findByAdmin(Admin admin) {
return (Admin) sessionFactory.getCurrentSession().
createQuery("from Admin where admin_name=? and pwd=?").
setParameter(0, admin.getAdminName()).
setParameter(1, admin.getAdminPwd()).
uniqueResult();
}
source
share