synopse / mORMot2

OpenSource RESTful ORM/SOA/MVC Framework for Delphi and FreePascal
https://synopse.info
Other
485 stars 122 forks source link

SimpleClient bug-fix for pas2js and other clients. M1->M2 bugfix #243

Closed TTomas closed 3 months ago

TTomas commented 3 months ago

Comments in code.

synopse commented 3 months ago

Thanks a lot.

See my comment above.

TTomas commented 3 months ago

About nested type names, in ContextFromRtti this code works great for me. Add fNestedId: integer in Class protected, needed if different records/arrays have same nested field name. Nested record have name TCatNested1 and array TCatsNested2 // set typName/typAsName if typName = '' then if rtti <> nil then begin + if rcfWithoutRtti in rtti.Flags then + typName := 'T'+parentName+IntToStr(InterlockedIncrement(fNestedId)) + else typName := rtti.Name end else typName := TYPES_LANG[lngDelphi, typ];

synopse commented 3 months ago

I will now review the code after merging.

Thanks a lot for all this debugging and sharing !