-->
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: which SQL query can solve this
PostPosted: Mon May 19, 2008 5:07 pm 
Newbie

Joined: Sun Jun 17, 2007 7:04 am
Posts: 11
Hi there,
maybe some HQL query guru can help me out there...

Let's say in my structure I have users, which are related to roles. A user has roles and they determine what the user can do in the system.
File categories are also related to roles and only users having at least one of the roles a category has, can access that category. The query I need is something like:

select c from Category c, User u where c.roles "has at least one of" u.roles

(User is the argument to the query)

Sorry I don't get to know how to really work with joins, ...


Thanks for any help,
Ignacio


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.