Hi Frans
I have a scenario like this and i am wondering if it is possible to get the data using PrefetchPaths:
Customer has Orders
Order has Details
Detail has Products
Order has Products
Here are the fields:
Customer
Cols: Id
Order
Cols: Id, OwnerId
Detail
Cols: Id, OrderId
Product
Cols: Id, OwnerId
I am trying to write a prefetch which will get me all of them in trip. Here is the equivalent sql which will work:
Select prod.* from Product prod
join Order o
on prod.OwnerId = o.Id
where o.OwnerId = '00000000-0000-0000-0000-000086210173'
union
Select prod.* from Product prod
join Details d
on prod.OwnerId = d.Id
join Order filter
on o.Id = d.OrderId
where o.OwnerId = '00000000-0000-0000-0000-000086210173'