#1 2021-05-14 21:12:06

keinn
Member
Registered: 2014-10-20
Posts: 100

mormot2 _ObjFast AV Exception with array of const params

function _ObjFast(const NameValuePairs: array of const): variant; overload;

eg:_ObjFast(['UserInfo',aUserRecObj,'Account',aAdminAccountrecObj]);

same code works fine in momrot 1.18

env: delphi rad 10.4.2

Last edited by keinn (2021-05-16 02:35:54)

Offline

#2 2021-05-15 05:22:26

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,207
Website

Re: mormot2 _ObjFast AV Exception with array of const params

I doubt it works with mORMot 1.18 since VarRecToVariant() does not support records because the Delphi/FPC do not suport records for "array of const" / TVarRec parameters at compiler level.

Offline

#3 2021-05-16 02:33:09

keinn
Member
Registered: 2014-10-20
Posts: 100

Re: mormot2 _ObjFast AV Exception with array of const params

sorry about my expression , the "record" i mean a orm record object instance .
so the problem is _ObjFast with array of const params(with object ), the  same code works whit 1.18 but not mormot2.
_ObjFast(['UserInfo',aUserRec,'Account',aAdminAccountrec]);

Offline

#4 2021-05-16 04:25:52

keinn
Member
Registered: 2014-10-20
Posts: 100

Re: mormot2 _ObjFast AV Exception with array of const params

answer excepted , the problem js my orm record contain a nested TSQLRecord field, witch did not filled by the TSQLRecord.create

Offline

Board footer

Powered by FluxBB