-->
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.  [ 2 posts ] 
Author Message
 Post subject: Help with making a query faster
PostPosted: Thu Nov 13, 2003 6:43 pm 
Newbie

Joined: Wed Nov 12, 2003 3:45 pm
Posts: 8
select users from users in class md.user.User where users.id in
(select distinct users from instance in class md.user.Instance
,users in instance.users.elements
,rolex in users.persistentRoles.elements
,permission in rolex.permissionSet.permissions.elements
,role in permission.roles.elements where role in
(select userz.persistentRoles.elements from userz in class md.user.User where userz.username = 'username') and
permission.operation in
(select operation from operation in class md.user.Operation where operation.name = 'view-others') and
instance.id = 1 and users.username like '%m%') order by users.address.lastName


That's the beast. The concept is using role based access control. The rough english translation of the above query is "select the set of users that the current user has view-others permission on." At least, this is what we want to accomplish.

Any help? Need more information, please let me know.

Thanks.


Top
 Profile  
 
 Post subject: faster
PostPosted: Thu Nov 13, 2003 9:02 pm 
Newbie

Joined: Fri Oct 24, 2003 9:23 pm
Posts: 10
why don't use load it into some form of cache, (and reload cache on changes?)


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

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.