怎么把下面5张表的查询sql语句改成hql语句 10
sql="selecttreeids,title,parentids,urlfromp_treejoinpower_roleontreeid=treeidsortreei...
sql="select treeids,title,parentids,url from p_tree join power_role on treeid=treeids or treeids=parentid
join p_role on roleid=roleids join power_userrole on roleides=roleids left join p_users on userides=userid where userid='"+id+"'"; 展开
join p_role on roleid=roleids join power_userrole on roleides=roleids left join p_users on userides=userid where userid='"+id+"'"; 展开
1个回答
展开全部
$sql="select treeids,title,parentids,url from p_tree join power_role on treeid=treeids or treeids=parentid join p_role on roleid=roleids join power_userrole on roleides=roleids left join p_users on userides=userid where userid='".id."'";
追问
你这语句和我的有什么区别么 后面的where条件先不说了,我这5张表是映射的所以在写hql语句的时候我对应的表名应该是映射的类名。但是他就还是报错语句不对
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询