-->
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: Help on join query
PostPosted: Thu Nov 06, 2008 8:03 am 
Newbie

Joined: Sun Jun 17, 2007 7:04 am
Posts: 11
In my system I have the following objects:

File
Category
User
Role
Permission

Files belong to one or more categories
Users can have one or more roles
A permission can refer to a file or a category of files (never both)
A permission can refer to a user or role (and so affecting all users in that role) (never both user and role)
Permission has 3 booleans, read, write, edit

I need a HQL query to get all files accessible by a user. It should return all files that have a read permission for that user or any of the roles assigned to the user and all files belonging to a category that has a read permission to that user or any of the roles assigned to the user.

I am pretty new to Hibernate/JBoss and I've been examining example queries but can't find anyone similar to this one... any directions/help?

thanks,
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.