-->
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: How to apply the same Filter on Entity X and Collection of X
PostPosted: Mon Aug 24, 2009 2:04 am 
Newbie

Joined: Mon Aug 24, 2009 1:53 am
Posts: 1
Hi

I am using Filters to enforce access rights but have encountered a duplicate-code problem.

We have a @Filter "Access" specified in Entity ClassA and is specific to this particular entity.
Another Entity ClassB has a Collection<ClassA>, but to enforce the same filter "Access" I will have to have the filter code from Entity ClassA duplicated in ClassB in relation to the Collection.

This is not an optimal solution since the filter consist of an sql query and repeating those is a NO-GO. :)

Does anybody know how to enforce an Entity filter when the Entity is accessed through a relation such as a collection?

Thank you in advance.

Kind regards
Henrik Skriver


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.