I have 2 tables (customers,orders) that I have manually created EntityRelations/PrefetchPaths for successfully. (Can't be done in the designer as there is no real PK defined, the tables use composite keys but are logically joined by customer.CustID=order.CustID)
I got this to work in getting the heiracrchy after adding the required plumbing.
IPrefetchPath prefetch = new PrefetchPath((int)EntityType.CustomerEntity);
prefetch.Add(CustomerEntity.PrefetchPathOrderCollection);
CustomerEntity c= new CustomerEntity (27, prefetch);
c.Orders = all the orders for the customers.
Now what do I have to do so that I can change/add/delete items in the c.Orders collection and have them all save with the right PK/FK when I call this.
c.Save(true);
I assume there is some plumbing where I have to tell the CustomerEntity that it has Orders and that there is a PK/FK relationship and what that relationship is etc. probably related to CustomerEntity.GetDependentRelatedEntities() and CustomerEntity.GetMemberEntityCollections() ?? I didn't see anything in the manual related to them though. LLBL of course generates these functions with no entities as there are no relationships in the designer.
Thanks,
Ian