-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Problem with Hibernate Left outer join
PostPosted: Tue Jun 15, 2010 8:37 am 
Newbie

Joined: Wed Jun 02, 2010 3:47 am
Posts: 3
Can anybody tell me how to convert the following sql query to hql
Code:
"select c.c_menu_id,c.c_menu_name,ifnull(d.c_permission_type,'NO') Permission " +
                            "from t_gb_menu_items c left outer join t_gb_user_group_permissions d " +
                            "on c.c_menu_id=d.c_menu_id and c_group_id='" + GroupId + "' " +
                            "order by c_menu_id";

I tried converting like this
Code:
"select c.CMenuId,c.CMenuName,ifnull(d.CPermissionType,'NO') AS Permission" +
                           " from TGbMenuItems AS c left outer join TGbUserGroupPermissions AS d " +
                           "on c.CMenuId=d.CMenuId and CGroupId='" + GroupId + "' " +
                          "order by CMenuId";

But i am getting error near "on" . So, instead of "on" i tried using "with" .Still i am getting error

Please tell me how to do it?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.