Bug in child-table serialization in most recent SCL version?
 
Forums / SmartComponent Library - Developer Forum / Bug in child-table serialization in most recent SCL version?

Bug in child-table serialization in most recent SCL version?

9 posts, 1 answered
  1. Patrik Wikström
    Patrik Wikström avatar
    68 posts
    Registered:
    15 Oct 2018
    17 Oct 2022
    Link to this post
    We upgraded to version Release 11.7 #71961@2022-09-28
    Now it seems that child tables are missing the id-field when serialized to JSON?

    The new GetData method in Service.cls class calls AddChildRows, could it be missing from that?
  2. Mike Fechner
    Mike Fechner avatar
    319 posts
    Registered:
    14 Sep 2016
    17 Oct 2022 in reply to Patrik Wikström
    Link to this post
    From which version have you upgraded? Please share your @RestAddress annotations and dataset and temp-table schema. 
  3. Patrik Wikström
    Patrik Wikström avatar
    68 posts
    Registered:
    15 Oct 2018
    17 Oct 2022
    Link to this post
    Version 2022-02-09, but we'll try using the old GetData method variant here soon in the ResourceWebHandler class:
    ...
                oService:GetData (cEntityName, cFilter, cNumRecords, cStopAfter, OUTPUT DATASET-HANDLE hDataset).

                hDataset:WRITE-JSON ("MEMPTR":U, mEntity, FALSE, "UTF-8":U, FALSE, FALSE) .

                oJsonEntity = CAST (NEW ObjectModelParser():Parse(mEntity), JsonObject) .
    ...
  4. Mike Fechner
    Mike Fechner avatar
    319 posts
    Registered:
    14 Sep 2016
    17 Oct 2022 in reply to Patrik Wikström
    Link to this post
    The last change to the ResourceWebHandler was in May 2022.
    The last change to the Service class was in June 2022.
  5. Patrik Wikström
    Patrik Wikström avatar
    68 posts
    Registered:
    15 Oct 2018
    17 Oct 2022
    Link to this post
    Yes, but aren't the id and seq fields now missing from the JSON-data outputted for the child-tables? Seq-field might have always been ? for child tables but that doesn't matter, the id-field is valuable for our code logic.

    See previous post: We now tested using the old code calling GetData and now the child tables have the id field again.
    Last modified on 17 Oct 2022 13:10 by Patrik Wikström
  6. Mike Fechner
    Mike Fechner avatar
    319 posts
    Registered:
    14 Sep 2016
    17 Oct 2022 in reply to Patrik Wikström
    Link to this post
    We'll have to test. 

    I would suggest you open a support ticket and we'll analyze. It would be helpful if you could provide the JSON response before and after the potential change along with the request URL.
  7. Patrik Wikström
    Patrik Wikström avatar
    68 posts
    Registered:
    15 Oct 2018
    17 Oct 2022
    Link to this post
    I'm 100% sure you can reproduce this with any father/child BE you have.
  8. Patrik Wikström
    Patrik Wikström avatar
    68 posts
    Registered:
    15 Oct 2018
    18 Oct 2022
    Link to this post
    We will open a support ticket also later today.
  9. Patrik Wikström
    Patrik Wikström avatar
    68 posts
    Registered:
    15 Oct 2018
    Answered
    27 Oct 2022
    Link to this post
    Now the ticket is finally created. 
9 posts, 1 answered