-->
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: Hibernate Restriction to use join on unrelated mappin tables
PostPosted: Tue Jan 29, 2013 2:50 am 
Newbie

Joined: Tue Jan 29, 2013 2:43 am
Posts: 1
Hi,

I am still quite new to hibernate and have a problem I don't seem to be able to solve. I have a dynamic search page which builds up a criteria object.
The basic query works fine, but now I have to restrict the amount of hits based on user access rights.
Basically every user is in multiple access roles and the items I am looking for are also assigned to multiple access roles.
My search will sofar retrieve all items based on the search criteria, but I have no clue on how to solve the problem with the access rights in the criteria api, since
I don#t think it supports theta style joins. The user class has a List of access roles (n:m) and the items also have a List of access roles (n:m).
Can you show me how to make sense of this issue? I guess there must be a way of using a subquery and an exist operator, but I seem not to be smart enough to solve this issue.

Kindest regards
Dennis


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.