I have a customer table with 2 customers. The linked Orders table has only 1 order. (fresh DB)
When I add a prefetch and select all the customers, I get 2 orders. They are copies of the same order (OrderPK is the same)
So CustomerCollection[0].OrderCollection.Count = 2
I use this code.
IPrefetchPath path = new PrefetchPath((int)EntityType.CustomerEntity);
path.Add(CustomerEntity.PrefetchPathOrderCollection);
myCustomerCollection.GetMulti(null,path);
The join is Orders.CustomerFK = Customers.CustomerPK. Very simple.
When I don't send in the path to GetMulti() I get correctly 1 order and everything works great in the app.
Ideas?