Page 1 of 1

How to Load whole tree model at startup

Posted: Mon 01 May 2017 01:07
by Lasha
Good day to you,
I`m newbie with EntityDac just experimenting with it, and I have tree model

Image

and I want to load whole data at startup, but as I see referenced columns load after they first time have been accessed and are there any ways to load whole referenced columns data at once at startup?

I have code like this

Code: Select all

var
  tour: TAbTournamentVw;
begin
  tour := DBM.EntityContext1.GetEntity<TAbTournamentVw>('tourid=1456');

  showmessage(inttostr(tour.AbCategoryVw.Catid)); 
// when access first time this property after this runs query to load category data

  showmessage(inttostr(tour.AbCategoryVw.AbSportsVw.Id));
// when access first time this property this property after this runs query to load sport data

and I`m interesting if are there any ways to load whole data with its dependencies at once, and not to loop whole data and access each column for the first time to load it..

thanks,

Re: How to Load whole tree model at startup

Posted: Wed 17 May 2017 07:19
by AlexP
Hello,

Please describe in more details the behavior you want to implement?