Hi,
I'm trying to generate a dataset with a custom projection of a 1-n relation.
What I've got so far is this (pseudocode):
DataSet ds = new DataSet("MyDataSet");
EntityCollection<CustomerEntity> customers = new EntityCollection<CustomerEntity>();
adapter.FetchEntityCollection(customers, null, ordersPrefetch);
List<IEntityPropertyProjector> projector = new List<IEntityPropertyProjector>{
new EntityPropertyProjector(CustomerFields.Name,CustomerFields.Name.Name);
};
customers.CreateHierarchicalProjection(projector, ds);
When I call the routine CreateHierarchicalProjection without the projector parameter, in the master table there is a relation with the child table defined.
However, I want to limit the number of columns in both tables, I don't want the PK-FK columns shown in the dataset. Therfor, I have created the projector variable. But I do want the related records in de master table.
Is there a way to get the related data as well?