On Monday, February 6, 2017 at 11:56:03 PM UTC+1, Ricardo Peres wrote: > > You can use filters. They apply to both entities and collections. See it > here: http://nhibernate.info/doc/nhibernate-reference/filters.html. >
Thank you Ricardo. In the previous post I forgot to mention that I'm aware of filters but they seem to be a bit "restrictive" for what I want to do. I need to have a set of detached criteria that can be mixed and applied to objects based on an xml file that describes permissions. This file is loaded in a sort of dictionary (ObjectType, permissions) when the application starts and whenever a query is issued I need to read the permission associated to the object being queried and apply the correct detached criteria. This is xml file is configurable and changes for various reason. I don't want to change the code when I need to modify this kind of permissions, that's why I think filters won't work. -- You received this message because you are subscribed to the Google Groups "nhusers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/nhusers. For more options, visit https://groups.google.com/d/optout.
