After some code changes and RO upgrades we have introduced an error and I would like to check what the intended behaviour is
We have a DA3 table ‘log’ in our DA schema which will only be used for writing (insertion)
The DA schema has an ‘autoinc’ primary key field but it is not marked as primary key in the DA schema
I notice the TDADataTable.MergeDelta code tries a locate of an empty PK array and then exits the for loop
if not Locate(pkfields, keyvals, ) then begin
This will have the effect that the last line of the for loop
if (Delta[i].Status = csResolved) then Delta.Delete(i);
is not executed. Our Delta[i].Status is equal to csResolved
We have an AfterMergeDelta(DataTable: TDADataTable); function which contains
if Assigned (DataTable) and Assigned (DataTable.Delta) and
(DataTable.Delta.Count <> 0) then
So we show our custom reconcile error screen (while nothing went wrong)
We can fix it by marking a field as PK in the DA schema but I was wondering if this was intended behaviour and how you propose aftermerge should handle this.
The code as is will keep csResoved deltas in the list. Does this have bad side effects?