#1 2023-02-18 19:24:44

dcoun
Member
From: Crete, Greece
Registered: 2020-02-18
Posts: 392

RetrieveListJson returns the mapped field name instead of 'ID'

After last commits, if I map existing primary key field of an external database's table to be the 'ID' in mormot2, when I use RetrieveListJson  I am getting the original name as primary key and not the 'ID' or 'RowID' in the produced json
I am mapping the existing primary key field name with: ExternalDB.MapField('ID','myfieldname');
Before last commits, RetrieveListJson returned:

["ID":1,....

Now it returns:

["myfieldname":1,....

The problem start fromlast commit 0f9f409205e340031fec3da8e709ba246dc9e845

Last edited by dcoun (2023-02-18 19:42:35)

Offline

#2 2023-02-19 16:31:21

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

Re: RetrieveListJson returns the mapped field name instead of 'ID'

You are right!

It should be fixed now with
https://github.com/synopse/mORMot2/commit/b398d759

Sorry for the regression.

Offline

#3 2023-02-19 16:48:15

dcoun
Member
From: Crete, Greece
Registered: 2020-02-18
Posts: 392

Re: RetrieveListJson returns the mapped field name instead of 'ID'

Thanks a lot @ab

Offline

Board footer

Powered by FluxBB