In my system I have the following classes:

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

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4187315#4187315

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4187315
_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to