FieldCompareRangePredicate - Passing in EntityCollection?

Posts   
 
    
mshe
User
Posts: 167
Joined: 02-Feb-2006
# Posted on: 23-May-2007 02:51:20   

Hi all,

I have several FieldCompareRangePredicate's which need to filter on an EntityCollection.

Do I need to build an array to pass into FieldCompareRangePredicate?

Is there a "shortcut" I can use to pass in EntityCollection and just specify the field name?

Thanks!

jmeckley
User
Posts: 403
Joined: 05-Jul-2006
# Posted on: 23-May-2007 03:38:42   

if your using LLBL 2.0 you can use the shortcuts check out Generated code - The predicate system, Adapter in the help documentation

mshe
User
Posts: 167
Joined: 02-Feb-2006
# Posted on: 23-May-2007 18:23:09   

jmeckley wrote:

if your using LLBL 2.0 you can use the shortcuts check out Generated code - The predicate system, Adapter in the help documentation

I forgot to mention I'm using self-servicing.

In the help file, here is the example:

Dim values As Integer() = New Integer(2) {1, 2, 5} filter.Add(New FieldCompareRangePredicate(OrderFields.OrderDate, values))

See how you need to create the array? I was just wondering if there was a way to just pass in an entity collection? I think when I tried passing in an EntityCollection ... it threw an exception saying it could not find the proper data type...

jmeckley
User
Posts: 403
Joined: 05-Jul-2006
# Posted on: 23-May-2007 18:43:01   

How would it know which fields to filter on? it couldn't use PK because an entity could have a composite key.

mshe
User
Posts: 167
Joined: 02-Feb-2006
# Posted on: 23-May-2007 19:43:12   

jmeckley wrote:

How would it know which fields to filter on? it couldn't use PK because an entity could have a composite key.

True, too bad there isn't an overload to specify the field name stuck_out_tongue_winking_eye