You are not logged in.
Hello,
I've trouble with the TSQLRawBlob type.
When I try to Transfert Data from a generic object to my agregat, using RTTI function to make it work in all case, it didn't succed with property of this type whereas it's ok when the same proprerty is RawUTF8.
Here is the part of code where I lose my value.
function TCommonDataTransfertObject.SetBasicProperty(aProp: TRttiProperty;
aValue: Variant; aSourceAsPointer: Pointer;
aPropertyType: System.TTypeKind): Boolean;
begin
Result := False;
try
case aPropertyType of
// ...
System.tkUString, System.tkString, System.tkWChar, System.tkWString,
System.tkChar, System.tkLString:
begin
if not VarIsNull(aValue) then
aProp.SetValue(aSourceAsPointer, VarToStr(aValue))
else aProp.SetValue(aSourceAsPointer, '');
end;
end;
Result := True;
except
Result := False;
end;
end;
Any idea ?
Regards
Offline
Argh ....
Well, I'm agree with you.
I'm trying to be DDD.
That's why I have an Agregat with my Domain, anda DataTransfertObject.
And I need to translate one to the other
Offline
Ensure you read https://synopse.info/files/html/Synopse … l#TITL_169
and especially https://synopse.info/files/html/Synopse … #TITLE_615
Offline