Initialization of big nested Structure

Initialization of big nested Structure

  

Hi,

I need to create big nested structure corresponding to my data model. Is there any restriction on depth of structure. Will there be any impact on performance if we create big nested structure and use that for transactional data.


Also if i have big nested structure and i need to populate the data only in root node (child nodes will not be populated), does it initialize complete tree of that structure or only the root node?


For example (refer below for structure), if i need to assign value in attr1 and attr2 of rootStruct, will it initilize all the child elements of rootStruct (e.g. struct1, struct2, struct1_1,......etc)? Or only rootStruct will be initialized without any child structure?


rootStruct

        attr1

        attr2

        attr3

        struct1

        struct2


struct1

       s1attr1

       s1attr2

       struct1_1

       struct1_2


struct2

       s2attr1

       s2attr2

       struct2_1

       struct2_2


struct1_1

      s1_1attr1

      s1_1attr2

      struct1_1_1

      ...

      ...

....

....


Regards,

Mushfik

Hi Mushfik,

OutSystems structures are always initialized with their default values. It means that when you create a structure all the attributes will be initialized (including the attributes of structure type... and so on... and so on). There's no limit on the depth of the structure, other than the memory limits of the application pool. The only limitation that you have you can't have loops, ie, an attribute of type Struct1 cannot appear inside Struct1.