Simple question:
I have three tables
A.ID 1-oo B.AID
C.ID 1-oo B.CID
Entity of A has property BsCollection which I can fetch by
using (DataAccessAdapter adapter = new DataAccessAdapter())
{
adapter.FetchEntityCollection(a.BsCollection, a.GetRelationInfoBsCollection());
}
After that fetch I have a collection of B's and each [b] in this collection has property C (should contain entity of C).
How to fetch enitity of C?
Intellisense LLBLGen generated comments tells me, that C should be fetched before fetching B.
I understand that I can fetch this entity by various methods, i.e.
C c = new C(b.CID);
adapter.FetchEntity(c);
b.C = c;
or
EntityCollection<C> Cs = new EntityCollection<C>();
adapter.FetchEntityCollection(Cs, b.GetRelationInfoC());
b.C = Cs[0];
but these are my combinations rather then out-of-the-box oneline solution.
So, how I could fetch a parent entity using relations info and not fetching entity collection?
Or maybe LLBLGen does not differentiate between 1-n and n-1 relation in this scenario?
Regards,
Jack