I am still having a problem with deepload and I really fail to understand how this is going on as it seems pretty basic to the DeepLoad functionality. The problem isn't with overflows anymore but it is with getting the Deepload to Load TLists
Its the same code I posted about in the top post but my object model goes
WebPage<--Zone<-->SecureObject-->ObjectPermissions
where
<-- = Many to one
<--> = One To One
--> = One to many
(zone can have many webpages, a zone has exactly one SecureObject, SecureObject can have many ObjectPermissions)
TList
<WebPage> _webPages = DataRepository.WebPageProvider.GetAll();
Type[] types = new Type[] { typeof (Zone), typeof (ObjectPermission), typeof (SecureObject), typeof (TList<ObjectPermission>)};
DataRepository.WebPageProvider.DeepLoad(_webPages, true, DeepLoadType.IncludeChildren, types);
It seems fairly straightforward that I should be able to check the objectPermissions on each webpage after this code, but the ObjectPermissionList never fills.
looking through the generated code: (debugging)
there is code that looks like this: (in SecureObjectProviderBaseCore.generated.cs)
if
(CanDeepLoad(entity, "List<ObjectPermission>|ObjectPermissionCollection", deepLoadType, innerList))
CanDeepLoad for the list ALWAYS returns false.... tracing further: (to EntityProviderBaseCore.Generated.cs)
else
if ( deepLoadType == DeepLoadType.IncludeChildren )
{
if (innerList.ContainsType(key) && !innerList.HasRun(entity, key))
{
Because innerList.ContainsType returns false ... trace deeper: (same file now in the DeepSession Class)
if (SkipChildren && lkey.StartsWith("List<"))
return false;
Because SkipChildern is always false... why? because its set that way in the deepload (backing out to ZoneProvdierBaseCore.generated.cs)
if
(deep && entity.ZoneIdSource != null)
{
innerList.SkipChildren = true;
DataRepository.SecureObjectProvider.DeepLoad(transactionManager, entity.ZoneIdSource, deep, deepLoadType, childTypes, innerList);
innerList.SkipChildren = false;
}
So the question is... why is the DeepSession.SkipChildren set to true each time recursive DeepLoads are called, regardless of the deep or deepLoadType parameters?
Please please let me know if I am doing something wrong...