jbb wrote:
Hello,
You can fetch the RO entity creating a prefetch path on RoPart and RoLabor.
If you use the adapter scenario you can use adapter.fetchEntity(RoEntity,PrefetchPath).
Then you will be able to access to RoPart and RoLabor EntityCollection from RO(using RO.RoPart for example).
Well this is sort of what I'm doing now.
EntityCollection<RoEntity> _ro = new EntityCollection<RoEntity>(new RoEntityFactory());
IPrefetchPath2 _path = new PrefetchPath2((int)EntityType.RoEntity);
_path.Add(RoEntity.PrefetchPathRoParts);
_path.Add(RoEntity.PrefetchPathRoLabor);
IRelationPredicateBucket _bucket = new RelationPredicateBucket(RoFields.Roid == _id);
DataCalls.FetchCollection(_ro, _bucket, _path);
return _ro;
The problem, is that it uses JOINS when I fetch this, so I don't have Parts or Labor as separate graphs, or separate parts of the graph, not sure that I want to have it this way... just unsure what's the best way to feed the data to the children.
I can create a datatable, loop through the collection and fill the table with the appropriate details and then feed it to the child, but again, I'm not sure this is the best way of handling.
Of course, I could be missing something simpler... that's why I'm asking