следующий запрос:
Query q = getSession().createQuery("FROM secroles
WHERE secroles.SR_ORG = :srOrg ,
secroles.SR_PROFILE= :srUser,
ISDELETED=:isDeleted");
ошибка:
org.hibernate.hql.ast.QuerySyntaxException: unexpected token: , near line 1, column 37 [FROM secroles WHERE SR_ORG = :srOrg , SR_PROFILE= :srUser , ISDELETED = :ISDELETED]
полная функция:
public String getSecroleByOrgNID(Organization srOrg, Profile srUser){try {
System.out.println("bug is here0");
begin();
Query q = getSession().createQuery("FROM secroles WHERE secroles.SR_ORG = :srOrg , secroles.SR_PROFILE= :srUser , ISDELETED=:isDeleted");
q.setParameter("srOrg", srOrg);
q.setParameter("srOrg", srUser);
q.setBoolean("isDeleted", false);
Secroles sr = (Secroles) q.uniqueResult();
Roletable rt = sr.getSrRole();
commit();
return rt.getRoleName();
} catch( HibernateException e ) {
rollback();
e.printStackTrace();
System.out.println("Could not assign role\n Message: "+e.getMessage());
}
return null;
}
}