You are not logged in.
Pages: 1
Hello,
I try to use ORM function in TDDDRepositoryRestQuery with my aggregat.
I have no problems when i use a simple TSQLRecord but i must register a TObjectList or Array of (Object) in TSQLRecord.
TPerson= class(TObject)
private
FName: RawUTF8
published
property Name : RawUTF8 read FName write FName;
end;
TPersons = array of TPerson;
TFamilly = class(TSQLRecord)
private
FName: RAWUTF8;
FMembers: TPersons;
Published
property Name: RawUTF8 read FName write FName;
property Members: TPersons read FMembers write FMembers;
end;
When i use ORMGetAllAggregates, my aggregat.Count (7362704) but in my sql3 database i have 7 rows.
I try with TFamilly.CreateandFillPrepare and i have 7 rows but my array is empty.
How to register and recover array of object ?
Offline
Yes, I did.
I just see a strange thing.
If i have one row, the name look like 'ðPY'#0#0#0#0#0'ðPY'#0'ðPY'#0'Àã'#.
If i have many row my aggregat is empty.
Offline
Ok, i find.
ORMGetAllAggregates don't must have a TObjectList Parameter.
If a use an array of Tpersons for example, it's works.
Offline
I have a new problem, if i use a TInterfacedCollection or TObjectList in TFamilly, my TPerson is not register in sql3 database, value = [].
ObjectToJSON(TFamilly.Members), it's works.
Using TJSONSerializer.RegisterClassForJSON or TJSONSerializer.RegisterCollectionForJSON.
SomeBody have an idea ?
Offline
Pages: 1