mikeydelamonde wrote:
Hello,
I have tried that, but the thing is that i am returning details from two tables, so if i use a collection with a relation then when i try to retrieve the words from each language in the collection the relation is lost and i am back to the beginning. If I use a typed list then I don't see where to add in the custom relation?
Mike
If you're returning data combined from 2 entities, you can't use an entity collection, you've to use either a dynamic list or a typed list.
A dynamic list requires you to formulate the relationcollection so you can then add the predicate when you add the relation.
In a typedlist this is a bit difficult. In Adapter, it's not that hard:
RelationPredicateBucket bucket = myTypedList.GetRelationInfo();
bucket.Relations[index].CustomFilter = ...;
then, pass bucket to FetchTypedList().
In SelfServicing, you've to derive a class from the TypedList class and override BuildRelationSet() and in there call the base.BuildRelationSet() and set the CustomFilter of the proper relation to the predicate you want.
You can also add the code to the usercode region in BuildRelationSet in the typed list class.