How to use the search with the Multiple entity

70 views
Skip to first unread message

tyxg...@163.com

unread,
May 14, 2014, 10:31:15 PM5/14/14
to java-gen...@googlegroups.com
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   !



Reply all
Reply to author
Forward
0 new messages