Related Hierarchical Data - Missing Prefetch Paths?

Posts   
 
    
Jessynoo avatar
Jessynoo
Support Team
Posts: 296
Joined: 19-Aug-2004
# Posted on: 27-Jul-2006 19:54:22   

Hi,

I have a problem building a large Entity Fetch involving inheritence using Prefetchs Paths.

Here's the kind of structure that causes the problem.

I have entities ParentA with child ChildA and ParentB with Child ChildB and a 1-n relation between ParentA and ParentB (ParentA is the group, ChildB a sub-group, ParentB an individual, and ChildB a sub-individual)

The corresponding PDM can be found at the following URL:

I'd like to fetch an element of type ChildA together with all the corresponding ChildB.

I though Polymorfic fetches could help but I can't find the paths I need:

There is a Prefetch path between ParentA or ChildA and ParentB, similarly there is one between ParentB or ChildB and ParentA, but there is no Paths between ParentA/ChildA and ChildB.

So I can fetch ChildA with corresponding ParentB but I can't reach ChildB.

Am I missing something?

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39927
Joined: 17-Aug-2003
# Posted on: 27-Jul-2006 20:26:57   

Fetch ParentB through the relation ParentA - ParentB and add a filter to the prefetchpathnode on the type, namely filter on childB simple_smile

Frans Bouma | Lead developer LLBLGen Pro
Jessynoo avatar
Jessynoo
Support Team
Posts: 296
Joined: 19-Aug-2004
# Posted on: 27-Jul-2006 20:36:46   

Thanks Frans,

I'll go with that (still a bit confused though).