Hi,
i have a problem with prefetch path. i describe it in an example:
i want to select customer entities which have orders from 'London'. i also want to fetch the corresponding order entities for that customer entities - but also only those orders from 'London'. if customer x have two orders - one from 'Paris' and one from 'London' - i want this customer and the customer entity should have the order from 'London' but not from 'Paris'.
How could i realize this in Selfservicing oder Adapter manner?
i have tried this:
CustomerCollection oCustomers = new CustomerCollection();
IPrefetchPath prefetchPath = new PrefetchPath((int)EntityType.CustomerEntity);
prefetchPath.Add(CustomerEntity.PrefetchPathOrders);
RelationCollection relationsToUse = new RelationCollection();
relationsToUse.Add(CustomerEntity.Relations.OrdersEntityUsingCustomerid);
IPredicateExpression filter = new PredicateExpression();
filter.Add(OrdersFields.Place == 'London');
oCustomers .GetMulti(filter,0, null, relationsToUse, prefetchPath);
but i get also the order from 'Paris'. what's my fault?
thanks,
shennig