daelmo wrote:
Hi Phil,
Could you please post some code snippet where you are trying to set it up?
Also, what are you using SetRelated Entity instead of use the common entity properties?
I will have to touch base with the developer as to why we can't use the property directly. He only sent me a test case with SetRelatedEntity.
In general, are SetRelatedEntity and SetRelatedEntityProperty not intended for use outside of the generated code?
Customer => Site is 1:m.
//test1: use property (works)
CustomerEntity customer = new CustomerEntity();
SiteEntity site = new SiteEntity();
site.Customer = customer;
MessageBox.Show(customer.Site.Count.ToString());
//test2: use SetRelatedEntity (doesn't work)
CustomerEntity customer2 = new CustomerEntity();
SiteEntity site2 = new SiteEntity();
site2.SetRelatedEntity(customer2, "Customer");
MessageBox.Show(customer2.Site.Count.ToString());
//test3: use SetRelatedEntityProperty (works)
CustomerEntity customer3 = new CustomerEntity();
SiteEntity site3 = new SiteEntity();
site3.SetRelatedEntityProperty("Customer", customer3);
MessageBox.Show(customer3.Site.Count.ToString());
Thanks,
Phil