Ok. How do I use DynamicRelation in code only to get a join of two entities. I am able to join my entities but I only can get the fields for only one side of the join.
HelperClasses.EntityCollection<TInvEntity> allInventory = new EntityCollection<TInvEntity>(new TInvEntityFactory());
DynamicRelation relation = new DynamicRelation(EntityType.TInvEntity,
JoinHint.Left,
EntityType.TInvLinksEntity,
String.Empty,
"LinkEntity",
HelperClasses.TInvFields.Id == HelperClasses.TInvLinksFields.MasterInvId.SetObjectAlias("LinkEntity"));
RelationPredicateBucket filter = new RelationPredicateBucket();
filter.Relations.Add(relation);
filter.SelectListAlias="LinkEntity";
daCDBSETUP.FetchEntityCollection(allInventory, filter);
So this is just a simple join between an Inventory and InventoryDetail Entity. It gives me the correct amount of elements returned in the collection, but the only fields I can access of the ones from the TInvEntity entity and none from the TInvLinksEntity. What am I messing? Do you have an example of joining two in memory entities, and being able to access all the fields after the join? I do now want to do the linking in the designer, I want to know how to do it just using DynamicRelation in code only.
Thanks,
Charlie J.