#1 mORMot 1 » ORM, Blob » 2016-12-12 16:44:04

thomasbouclet
Replies: 0

Hello,

I must save script in TSQLrecord, my property Aggregate/SQLRecord is an TSQLRawBlob.

In the documentation, the is parameter "ForceBlobTransfert" on TSQLRestClientUri but i must use RetrieveBlobFields/UpdateBlobFields in Factory.
What is the utility of this parameter ?

Furthermore, when i use PropInfo.GetLongStrValue, StrValue is converted to HexaDecimal. I suppose, they are good reasons, But which ones ?

Best Regards.

#2 Re: mORMot 1 » ORM, record and Aggregat » 2016-08-26 08:41:10

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 ?

#3 Re: mORMot 1 » ORM, record and Aggregat » 2016-08-25 15:07:15

Ok, i find.

ORMGetAllAggregates don't must have a TObjectList Parameter.

If a use an array of Tpersons for example, it's works.

#4 Re: mORMot 1 » ORM, record and Aggregat » 2016-08-25 13:11:34

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.

#5 mORMot 1 » ORM, record and Aggregat » 2016-08-25 08:29:30

thomasbouclet
Replies: 4

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 ?

Board footer

Powered by FluxBB