XData + TXDataClient + AureliusDataset + autoinc ID fields

What's recommended for dealing with autoinc IDs using TXDataClient and AureliusDataSets object events (Insert/Remove/Update) ?
How to retrieve those IDs after Post and use them on associated objects?
There are no Demos on writing objects this way, a complete CRUD demo, nor using these AureliusdataSet object events.

Also, is there any additional info about xdata PostModes ? Documentation mentions it, but only shows PutModes details.

Thanks.

Aurelius/XData should handle everything automatically.
When you post an object with TXDataClient, if the id is automatically generated by the server, the id property of the object is automatically updated, The dataset also reflects that.

You can check demo in demos\MultiTenancy, it works that way.

About PostMode, it indicates if XData will use Manager.Save or Manager.Replicate when inserting objects. The later is recommended as it automatically handles duplicated entity instances with same id in the object tree.

2 Likes

Thanks a lot!
I'll make some tests with that.

:face_with_peeking_eye:

I 've been searching the events in .PAS files. Should search DFMs.

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.