master deatil issue
Posted: Wed 01 Feb 2017 13:36
Hi
I've a master detail model.
I get a master entity with this code:
the detail items do load without problems.
Then i create and add a new detail item to the masterThen i save everything to the database.
The data are saved without problems.
I've checked the content of the d.b. tables.
To finish with i try to get the master entity with the following code
but the master detail list does not contain the newly added item.
I close and then start the app again i find the item.
TIA
I've a master detail model.
I get a master entity with this code:
Code: Select all
m := context.GetEntity<TMaster>([7]);
Then i create and add a new detail item to the master
Code: Select all
d := context.CreateEntity<TDetail>;
d.pk := m.pk;
...
context.Attach(d);
m.DetailList.Add(d);
The data are saved without problems.
I've checked the content of the d.b. tables.
To finish with i try to get the master entity with the following code
Code: Select all
m1 := context.GetEntity<TMaster>([7]);
I close and then start the app again i find the item.
TIA