How to Load whole tree model at startup
Posted: Mon 01 May 2017 01:07
Good day to you,
I`m newbie with EntityDac just experimenting with it, and I have tree model

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
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,
I`m newbie with EntityDac just experimenting with it, and I have tree model

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
thanks,