#1 2018-02-08 18:57:12

EMartin
Member
From: Buenos Aires - Argentina
Registered: 2013-01-09
Posts: 337

Possible bugs in TSQLTable.GetJSONValues and TSQLTable.ToDocVariant

Hi @ab, I think that I found bugs in TSQLTable.GetJSONValues and TSQLTable.ToDocVariant, how I can
reproduce them I generated an application test case and I put it in https://drive.google.com/open?id=1kBpGl … yWlSm8-GkX.

The second and third button reproduce the problems and in ToDocVariant checking the "Workaround" checkbox solve the same.

Can you verify this please ?

Thanks.


Esteban

Offline

#2 2018-02-09 13:12:08

EMartin
Member
From: Buenos Aires - Argentina
Registered: 2013-01-09
Posts: 337

Re: Possible bugs in TSQLTable.GetJSONValues and TSQLTable.ToDocVariant

@ab, can you see this ?

Thanks.


Esteban

Offline

#3 2018-02-10 14:57:23

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

Re: Possible bugs in TSQLTable.GetJSONValues and TSQLTable.ToDocVariant

Please check https://synopse.info/fossil/info/e6744742ea for the first one.

I will look also into the 2nd potential problem.

Offline

#4 2018-02-11 17:14:20

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

Re: Possible bugs in TSQLTable.GetJSONValues and TSQLTable.ToDocVariant

The ToDocVariant was much more difficult to track...
The Delete operation did modify the TSQLTable.fFieldNames[] content, which was copied by reference to the TDocVariant.

Should be fixed by https://synopse.info/fossil/info/3df34f09d2

Offline

#5 2018-02-14 13:57:39

EMartin
Member
From: Buenos Aires - Argentina
Registered: 2013-01-09
Posts: 337

Re: Possible bugs in TSQLTable.GetJSONValues and TSQLTable.ToDocVariant

Thanks @ab, all works fine.


Esteban

Offline

#6 2018-02-14 20:06:02

EMartin
Member
From: Buenos Aires - Argentina
Registered: 2013-01-09
Posts: 337

Re: Possible bugs in TSQLTable.GetJSONValues and TSQLTable.ToDocVariant

Sorry @ab, but in the last fixes have been introduced a bug when saving objects to JSON from TDynArray. In https://drive.google.com/open?id=1qCR1x … jx4ev2wLbK I added a button DynArrayObj that plays the fail case.

For me application, this bug is a breaking change and I need that works as before.

UPDATE:

I have the following interface based service:

function ImportTable(cosnt aCSVOptions: TCDICSVOptions; const aTableOptions: TCDITableOptions; const aMapFieldOptions: TCDIMapFieldOptionArray): TServiceCustomAnswer;

and before the fixes this services worked ok, but after the same the server receives the aMapFieldOptions parameter of the same way that the reproduced fail test case.

Thanks in advance.

Last edited by EMartin (2018-02-14 20:42:21)


Esteban

Offline

#7 2018-02-15 12:17:12

EMartin
Member
From: Buenos Aires - Argentina
Registered: 2013-01-09
Posts: 337

Re: Possible bugs in TSQLTable.GetJSONValues and TSQLTable.ToDocVariant

Sorry @ab for my insistence, can you see this issue ?

Thanks.


Esteban

Offline

#8 2018-02-15 14:18:36

EMartin
Member
From: Buenos Aires - Argentina
Registered: 2013-01-09
Posts: 337

Re: Possible bugs in TSQLTable.GetJSONValues and TSQLTable.ToDocVariant

I found the error in my test case, I forgot this code:

TJSONSerializer.RegisterObjArrayForJSON(TypeInfo(TCDIMapFieldOptionArray), TCDIMapFieldOption);

I don't understand why the JSON serialization in interface based service is not working more. That's is my big problem.

I'all appreciate any help.


Esteban

Offline

Board footer

Powered by FluxBB