I am using a TXDataWebDataset and posting to an XDataServer.
On the server, in TXDataServer.OnEntityInserting a value is set to one of the fields. This is inserted into the database, but in the TXDataWebDataset.AfterApplyUpdates this value isn't present.
What is the BatchId value in the request JSON body sent to the server? 0
What is the TSalesSheet(Entity).BatchId value received in the server? 0
3a. Allocated on the server 105
3b. Value after inserting (TXdataServer.EntityInserted): 105
What is the FBatchId value in the AfterApplyUpdates event: 0 - Even stepped through and the dataset when read in afterapplyupdate shows batchid as 0.
What's interesting is that the 2 other fields populated in the server DateAdded and AddedBy are both Null, although are populated in the db. The only field where the data is added on the server which is not the value it was sent with is the Id field which is completed by Aurelius.
The automatic CRUD endpoint returns the updated object, it's just the dataset that doesn't update the object itself. We might include an option for that to happen in a future release.
or I can wait for you to include the option, as it must be reasonably straight forward - and after all why wouldn't you want the latest version of the data? Not having it there might cause inconsistencies if you edited something and updated it, you'd overwrite the chnages made on insert with blanks I guess.