Hello,
Im not sure if I understand correctly what is the MergeDelta method given for… Documentation wiki says:
“This persists the changes in the local data, but removes them from the Delta so they will not be (re-)applied to the server…”
I sounds reasonable and expectable, but its not whole true. After MergeDelta is processed, unsaved (pending) changes still remains in Delta. See part of code inside the MergeDelta method:
// Merges the updates
if (Delta.Count>0) then begin
SetLength(pk_array, Delta.LoggedFieldCount);
for i := 0 to Delta.LoggedFieldCount - 1 do
pk_array[i]:=False;
for i := 0 to key_cnt - 1 do begin
x := Delta.IndexOfLoggedField(keynames[i]);
if x <> -1 then pk_array[x]:=True;
end;
for i := (Delta.Count-1) downto 0 do begin
if (Delta[i].Status = csPending) then continue; <<<<< !!!!!
if (Delta[i].ChangeType<>ctDelete) then begin
As can be sighted at highlighted line, when Delta content is iterated, unsaved (pending) changes are ignored. Why?
I guess its not desired behavior and it should be considered as error.
Greetings from Prague
Jaroslav