}
@SuppressWarnings("unchecked")
@Override
public List<SecGroup> getGroupsByUser(SecUser aUser) {
DetachedCriteria criteria = DetachedCriteria.forClass(SecGroup.class);
// Aliases are working only on properties
criteria.createAlias("secRolegroups", "rg");
criteria.createAlias("secRoles", "rol");
criteria.add(Restrictions.eq("rg.rol.secUser", aUser));
return getHibernateTemplate().findByCriteria(criteria);
}