Synergex/CodeGen

Failed to get repository information for field inside nested groups

theplasmastorm opened this issue · 1 comments

The GPC structure of XFPL test cannot be codegen'd because the structure has nested groups, and inside one of the nested groups is a field it cannot see.

Structure GPC   DBL ISAM
…
Group GRP_1A   Type ALPHA
   …
   Group GRP_1B   Type ALPHA
      …
      Field FLD_3E   Type ALPHA   Size 6
         Description "GPC.GRP_1A.GRP_1B.FLD_3E"
   Endgroup
   …
Endgroup
codegen gen -s GPC -t c:\Users\devadm\Desktop\HarmonyCore\Templates\TraditionalBridge\ODataModel c:\Users\devadm\Desktop\HarmonyCore\Templates\TraditionalBridge\ODataMetaData -o c:\Users\devadm\Desktop\HarmonyCore\TraditionalBridge.Test\Models -n TraditionalBridge.Test.Models -e -r -lf
ERROR: Failed to get repository information for GPC.FLD_3E

More generally, if a Repository structure contains a group, and that group includes a second group (as reference to a separate structure), GodeGen fails to recognize any subsequent fields in the first group.

For example, the following structures would cause an error:

Structure GPCNEW2 DBL ISAM
Field FLD_Z Type ALPHA Size 6

Structure GPCNEW DBL ISAM
Group GRP_1A Type ALPHA
Group STRUCT_2E Reference GPCNEW2 Type ALPHA
Field FLD_3E Type ALPHA Size 6
Endgroup

To reproduce, load these structures (gpcnew.txt) into a Repository:
dbr RPS:rpsutl -i gpcnew.txt -ia
Then run CodeGen with any template, using the GPCNEW structure:
codegen -s GPCNEW -t cs_class