v2.0.50727
Adapter
I am trying to filter my FindMatches call using a Relation Predicate but all I ever seem to get is an empty collection
Here is a sample of my failing code:
RelationPredicateBucket bucket = new RelationPredicateBucket();
bucket.Relations.Add(ParameterEntity.Relations.JobTypeParameterEntityUsingJobTypeParameterFk);
bucket.PredicateExpression.Add(JobTypeParameterFields.Name == name);
List<int> indexes = Parameters.FindMatches(bucket.PredicateExpression);
if (indexes.Count > 0)
{
return Parameters[indexes[indexes.Count - 1]];
}
where Parameters is a collection of ParameterEntity which references JobTypeParameterEntity
if I write my code like this then it works fine:
foreach (ParameterEntity parameter in Parameters)
{
if (parameter.JobTypeParameter.Name == name)
{
return parameter;
}
}
I guess I am doing something dumb
Thanks for any hints
--Sam