-->
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.  [ 2 posts ] 
Author Message
 Post subject: Using Predicates and List.Find
PostPosted: Fri Apr 27, 2007 10:13 am 
Beginner
Beginner

Joined: Thu Aug 17, 2006 3:20 pm
Posts: 21
Hibernate version:
1.2

My question is fairly simple. I am attempting to use an aggregate pattern to control access to object collections. In one of my classes I am trying to use a Predicate to Find the corresponding child object in an IList collection. The problem is, in order to use the List.Find(predicate), I need to have a List instead of IList which my mapping as a bag doesnt seem to work.

My question is this, is there a way to map to a List so that I can use predicate functionality without converting the collection to a List?

thank you


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 30, 2007 6:42 am 
Beginner
Beginner

Joined: Tue May 02, 2006 8:04 am
Posts: 34
Don't think so

(new List(your Ilist variable)).Find(your predicate)


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

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.