Hi,
I'm trying to use nHibernate in my new project, but i seem to be having a little issue. I've got two objects: category and Item. Both can be assigned a property "instance" specifying if it is visible from .com; .org or both. (enum)
When someone enters my website from .com I want to show categories which are assigned to .com or to .com/.org. No problem so far.
Now when I want to show information about let's say the number of items in a category i've got a problem. A category which is assigned to both instances returns an itemcollection containing all associated items. But I only want the items with the .com or both instance, so in this case i want to exclude the .org items.
Is there any simple way to solve this problem in the mapping or in a seperate class?
Sorry for the cloudy explanation.
|