OK, so say I have 2 tables, User and ProductPurchased. There is a foreign key in ProductPurchased which links it to User.
So, in my code I can access the ProductPurchased collection of a User like so:
User.ProductPurchased
And I get the correct results.
Now I just want only the ProductPurchased for the User that cost more than "50".
So I create a predicate:
Dim Filter As New PredicateExpression(ProductPurchasedFields.Price > 50)
How do I get the results I'm expecting?
I tried:
User.ProductPurchased.GetMulti(Filter)
But the results were bizarre. I got a collection which contained ALL the ProductPurchased from all User, but the UserId column in the ProductPurchased was all set the same.
Is my question even sane?
Or should I just create a predicate which has the Price and UserId columns in it and forget trying to take the shortcut through the User object?