You are not logged in.
Pages: 1
As documented in the code
procedure SetInt64Prop(Instance: TObject; PropInfo: PPropInfo; const Value: Int64);
// AB: use the getter field address if no setter (no write attribute) exists
and with this
procedure TSQLRecord.ComputeFieldsBeforeWrite(aRest: TSQLRest; aOccasion: TSQLEvent);
var F: integer;
begin
if (self<>nil) and (aRest<>nil) then
with RecordProps do begin
if HasModTimeFields then
for F := 0 to high(FieldType) do
if FieldType[f]=sftModTime then
SetInt64Prop(Self,Fields[F],aRest.ServerTimeStamp);
if HasCreateTimeField and (aOccasion=seAdd) then
for F := 0 to high(FieldType) do
if FieldType[f]=sftCreateTime then
SetInt64Prop(Self,Fields[F],aRest.ServerTimeStamp);
end;
end;
i would expect that this prop should have been updated by sending back to server:
TSQLMyRec = class( TSQLRecord )
private
fModTime : TModTime;
published
property ModTime : TModTime read fModTime;
end;
but the value will still be 0
Offline
You are right!
There was an issue with the SetInt64Prop() procedure which failed the update of a property with no explicit setter.
It is now fixed - and I've modified the regression tests to also check this particular pattern.
See http://synopse.info/fossil/info/eff2485f1d
Thanks for the report!
Offline
thanx a lot
Offline
Pages: 1