HI :
How to use the search to realize this hql .
" String hql = "select ro from Role ro,Function fun, Resource re
where re.function.functionId=fun.functionId and re.resourceId=" + resourceId + " and ro in elements(fun.roles)"";
this is the sql .
"select r.* from app_role r , app_function f ,app_resource re,app_role_function rf where
re.functionid = f.functionid and re.resourceid=1 and r.roleid = rf.roleid"
Thanks !