Opraven dotaz pro vyhodnocení, jestli je role požita v procesu

schválení.
closes #125
multitenant
Josef Rokos 10 years ago
parent 2b24f30fb4
commit bbad265709

@ -87,7 +87,7 @@ public class RoleServiceImpl extends AbstractService<Role> implements RoleServic
@Override
@Transactional
public boolean isInWorkflow(Role role) {
Query q = dao.getQuery("select count(*) from Workflow where role = :role");
Query q = dao.getQuery("select count(rt) from RequirementType rt join rt.workflow w join w.role role where role = :role");
q.setParameter("role", role);
long i = (Long)q.uniqueResult();
return i != 0;

Loading…
Cancel
Save