Base solution for your next web application
Open Closed

Power Tools - Master Details Entity JSON Creation Issue. #11594


User avatar
0
mittera created

When adding a new master detail property to an existing entity, the process fails to generate code.

From looking into the issue it is related to the entity.json data being saved at the beginning of the file generation.

It appears there is a string concatenation issue related to the IsGeneratedByMasterpage property.

Please see attached image:


6 Answer(s)
  • User Avatar
    0
    m.aliozkaya created
    Support Team

    Hi @mittera,

    Could you share .json files with us?

  • User Avatar
    0
    mittera created

    I can provide them but it requires a couple entity json files to make it happen as it only happens with Master Detail pages.

    How do i go about getting you these files? Do I just a attach them here, or is there a better method?

    The problem seems to happen randomly, or at least I haven't figured out the trigger yet.

    But it usually happens when regenerating an entity that has at least one master detail property.

    The build for the primary entity builds then it automatically tries to rebuild the foreign object.

    This logs that it is starting in the console, but then just sits there, I have waited 30 minutes, and nothing.

    So I cancel the generation, and rerun it, but now the primary entity will not even start...

    In review of the json entity files, the primary entity and the foreign entity files have the same timestamp.

    This is also the same time of the first failed execution. So both files were updated during the execution.

    Nothing looks different in the primary entity file, but the foreign entity file is different with the navigation property looking like the image I sent in creating this ticket.

    So I update the navigation property to move the "IsGeneratedbyMasterPage" to where it should be and save the file.

    I then can then regenerate the primary entity again, and the foreign entity auto generates as well.

    The problem is, Power Tools is reading in valid json using it and then replacing it with invalid json.

    The other thing to note, is that once the invalid file is fixed, by simply moving the "IsGeneratedbyMasterPage" property, the fixed file is i identical to the original input file. So Power Tools over wrote it but was not intending to even make any changes..

    This makes me wonder is there a way to ensure the entity json files are not auto updated during generation process, especially if the content is not changing.........

  • User Avatar
    0
    mittera created

    In the application I am working on I have entity "A", "B", and "C".

    "A" is a menu item with "B" as a master detail. "B is also on the menu with "C" as a master detail

    If I regenerate in this order C, B, A it all works.

    Then I can regenerate "A" without issue multiple times.

    Then if I regenerate "B", it still works.

    But then If I try to regenerate "A" again it will fail, with the JSON issue listed above.

    So not sure it it is the three tired relationship, or just that it was built as both a master and a detail...

    But after fixing the JSON I can regenerate "A" again...

    Hope this additional information helps.

  • User Avatar
    0
    m.aliozkaya created
    Support Team

    Hi @mittera ,

    I tried to reproduce it but it seems working. I created 3 entities and A master B Child (B master C child). When I regenerate it is working. Is your power tools updated?

  • User Avatar
    0
    mittera created

    I am using 3.3.0

    I have attached the entity json files to this link.

    I notice the experience when I build Workflow, Workflow Symbol, ProductionOutput, WorkflowProperty, WorkflowSymbolProperty

    Then try to rebuild the Workflow one again if you can even get this far before it has the issue.

    Not 100% consistent, but it is persistently present.

  • User Avatar
    0
    m.aliozkaya created
    Support Team

    Hi @mittera,

    I tried this in many different forms.

    Workflow, Workflow Symbol, ProductionOutput, WorkflowProperty, WorkflowSymbolProperty then Workflow Symbol, ProductionOutput, Workflow, WorkflowSchedule, Workflow and etc

    But I can't reproduced it. It may happen in a very exceptional situation. If you still have the problem, could you share this project with us [email protected]