How to Load whole tree model at startup

Discussion of open issues, suggestions and bugs regarding EntityDAC
Post Reply
Lasha
Posts: 1
Joined: Mon 01 May 2017 00:40

How to Load whole tree model at startup

Post by Lasha » Mon 01 May 2017 01:07

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,

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: How to Load whole tree model at startup

Post by AlexP » Wed 17 May 2017 07:19

Hello,

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

Post Reply