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