-->
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: Extra collection filtering
PostPosted: Wed Apr 19, 2006 1:34 pm 
Newbie

Joined: Wed Apr 19, 2006 1:17 pm
Posts: 1
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.


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.