也就是a 关联b b关联c 然后根据c的name取到a
DetachedCriteria dc= DetachedCriteria.forClass(peUser.class);//a
dc.createAlias("peLoginUser", "peLoginUser");//b后者是别名
dc.createAlias("peLoginUser.enumconstRole", "enumconstRole");//c
dc.add(Restrictions.like("enumconstRole.name", name));