Hello,
when does LLBL load an entity from the database in the following scenario:
EntityCollection nameColl = new EntityCollection(new NameEntityFactory());
IRelationPredicateBucket filter = new RelationPredicateBucket();
filter.PredicateExpression.Add(PredicateFactory.CompareValue(NameFieldIndex.id, ComparisonOperator.LesserThan, 100));
bool load = adapter.FetchEntityCollection(nameColl, filter);
//if load ist true, the entity is loaded from the database
//Now ( a little bit later) I would like to load an entity from an related table(class) Adress too.
//I know that I can do this by using the PrefetchPath an the whole thing would look like this:
EntityCollection nameColl = new EntityCollection(new DispoNameFactory());
IPrefetchPath2 prefetchPath = new PrefetchPath2((int)EntityType.NameEntity);
prefetchPath.Add(NameEntity.PrefetchPathAdress).SubPath.Add(Adress.PrefetchPathnrname);
IRelationPredicateBucket filter = new RelationPredicateBucket();
filter.PredicateExpression.Add(PredicateFactory.CompareValue(NameFieldIndex.id, ComparisonOperator.Equal, 1));
adapter.FetchEntityCollection(nameColl, filter, prefetchPath);
Does LLBL Gen loads in this second case the nameColl from the database, or does LLBL Gen merge the related and of course new AdressObject to the "old" nameColl" EntityCollection which was filled in the first scenario and loads only the new Adress Object from the database ?
Maybe you can suggest me a better way to do this ?
Thank you,
Slowhand