Home
Help
Register
Log in

Search

 
   Active Threads  

You are here: Home > LLBLGen Pro > LLBLGen Pro Runtime Framework> Why would it ignore a prefetch?
 

Pages: 1
LLBLGen Pro Runtime Framework
Why would it ignore a prefetch?
Page:1/1 

  Print all messages in this thread  
Poster Message
Ian
User



Location:
Hertfordshire, UK
Joined on:
01-Apr-2005 16:37:36
Posted:
511 posts
# Posted on: 24-Sep-2017 20:31:01.  
Code:
            var adapter = new DataAccessAdapter();

            var entity = new ChaletAccountEntity { AccountId = accountId };

            var path = new PrefetchPath2(EntityType.ChaletAccountEntity);
            path.Add(ChaletAccountEntity.PrefetchPathChaletInstance.SubPath.Add(ChaletInstanceEntity.PrefetchPathChalet));
            path.Add(ChaletAccountEntity.PrefetchPathVwEventAccount.SubPath.Add(
                    VwEventAccountEntity.PrefetchPathEvent));

            adapter.FetchEntity(entity, path);


ChaletInstance and VwEventAccount are both null and the generated code doesn't even look for them. How could this be?
  Top
Ian
User



Location:
Hertfordshire, UK
Joined on:
01-Apr-2005 16:37:36
Posted:
511 posts
# Posted on: 24-Sep-2017 20:41:07.  
Code:
var adapter = new DataAccessAdapter();

            var entity = new ChaletAccountEntity { AccountId = accountId };

            var path = new PrefetchPath2(EntityType.ChaletAccountEntity);
            path.Add(ChaletAccountEntity.PrefetchPathChaletInstance).SubPath.Add(ChaletInstanceEntity.PrefetchPathChalet);
            path.Add(ChaletAccountEntity.PrefetchPathVwEventAccount).SubPath.Add(
                    VwEventAccountEntity.PrefetchPathEvent);

            adapter.FetchEntity(entity, path);


A warning message would be helpful for the first post's code!


  Top
Otis
LLBLGen Pro Team



Location:
The Hague, The Netherlands
Joined on:
17-Aug-2003 18:00:36
Posted:
37869 posts
# Posted on: 25-Sep-2017 13:45:31.  
thing is, it can't detect that, as it adds itself to a path node in the first code too, it's just that the path node it is added to is not added to something. How would you detect that? It simply goes out of scope. Mind you it is possible to build paths that way (add subpaths to nodes which later on are added to path nodes) so you can't say 'the subnode is added to a node which isn't in a path-> bad'.

Frans Bouma
LLBLGen Pro / ORM Profiler Lead Developer | Blog | Twitter
 
Top
Pages: 1  


Powered by HnD ©2002-2007 Solutions Design
HnD uses LLBLGen Pro

Version: 2.1.12172008 Final.