Hi,

I would like to filter the data that is being retrieved by NH from the
database. I have a class "projecttype", which holds a collection of
"projectsteps". But I only want to load those steps that are active.

So I figured I could define a filter in the mapping somewhere, so that
I don't have to do that in code. I remembered that there was a filter-
element inside of the bag-element. So I added

<filter name="onlyActive" condition="IsActive=true"></filter>

But I figured that I also need a filterdef element as well as I need
to enable filtering for the session. This might be a little tricky,
since I get my session from the NHibernateIntegrationFacility via
CastleWindsor. Also I don't actually need a named parameter, since my
filter-value would alwasy be constant.

Any thought on how to add a general filtering? Is the use of NH-
filters recommended? Is there a general way to enable filters?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to