What is intended behaviour in DA when no field is specified as PK

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
… Continue

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
begin
ShowReconcileErrors (DataTable);
end;

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?

Hi,

as I can see, we have

if not Locate(pkfields, keyvals, []) then begin
  if Assigned(fOnMergeDeltaUnknownChange) then fOnMergeDeltaUnknownChange(Self, fDelta,Delta[i]);
    Continue;
end;

so you can create OnMergeDeltaUnknownChange event and remove all csResolved changes manually. also you can do it in your AfterMergeDelta event

according to DA logic, if it cannot find a record, as in your case, this is incorrect situation and it cannot be resolved automatically by DA.