Prefetch Path Question

Posts   
 
    
psandler
User
Posts: 540
Joined: 22-Feb-2005
# Posted on: 23-Aug-2006 20:57:48   

Hey,

Let's say I have table set up like the following:

TableA

TableA_Id

TableB

TableB_Id TableA_Id

TableC

TableC_Id TableA_Id

TableD

TableD_Id TableB_Id TableC_Id

So I can Prefetch like this:

A => B A => C

Then I can either prefetch:

B => D or C => D

My question is, is there any way of prefetching from B and C => D

So, instead of getting all D that relate to B (or C), I get only the D that relates to both B and C.

I swear I have done this in the past, but I can't find it in the forums or by searching through my code.

Would I create a filter and pass it to the prefetch for D? So if I was prefetching B => D, create a rpBucket with joins from from A => C and use it as the prefetch predicate?

I hope the question makes sense. simple_smile

Thanks,

Phil

bclubb
User
Posts: 934
Joined: 12-Feb-2004
# Posted on: 24-Aug-2006 03:28:25   

You would be able to do something like this the way that you defined. Prefetching A-B-D and then defining a filter that ensures that C-D exists for these entities. It's not the most common way to use the prefetch paths and you may consider just doing this using the entity information and generating a similar filter.

Let us know if you have any problems getting this to work.