How does BusinessEntity super class find records to update?

Posted by jmartin104 on 26-Mar-2018 06:58

If my data access layer calls the super class method "UpdateData" and passes a temp-table via a dataset, how are the records from the temp-table read from and updated to the db?

I would think something like some sort of rowid would be attached to the table?

All Replies

Posted by Mike Fechner on 26-Mar-2018 11:38

Not sure about your Business Entity implementation.
 
But if it involves ProDatasets and DATA-SOURCE object handles, the mapping may be defined based on KEY fields (automatic mapping or KEYS phrase in the DEFINE DATA-SOURCE statement) or ROWID.

Posted by jmartin104 on 27-Mar-2018 11:14

I'm not sure. I'll have to dig deeper to see how it's setup. Right now, we are using the default SUPER class.

Posted by Peter Judge on 27-Mar-2018 11:28

Basically, for Create, Update and Delete operations the BE assumes all the records passed in are to be updated.

For Submit operations, the BE requires the dataset's tables to have before-image records.

The BE's CommitRows() method does this IIRC.

This thread is closed