I have a slightly more complex prefetch to the one that you helped with a few weeks ago:
Person can have PositionOccupancies, a PositionOccupancy is for a Position, a Position can belong to a department and be related to a JobType.
Have tried the following without success as the PositionOccupancy is being prefetched twice:
Dim obj as IPrefetchElement
obj = PERSONEntity.prefetchpathPositionOccupancy
obj.subpath.add(POSITIONOCCUPANCYEntity.PrefetchPathPOSITION).subpath.Add(POSITIONEntity.PrefetchPathJOBTYPE)
obj.subpath.add(POSITIONOCCUPANCYEntity.PrefetchPathPOSITION).subpath.Add(POSITIONEntity.PrefetchPathDEPARTMENT)
I can't seem to find a variant which works correctly,
Many thanks,
Paul.