In the gix4 project using the openexpressapp framework, the lazy loading of objects is divided into the following two methods based on the object nature:
Root object class:
Get method: Get the root object with the first level of sub-object attributes.
Getlazy method: Get the root object without sub-object attributes. It is only used when a simple list is displayed. The concept of lazy loading is special here. It is roughly like this: When you click a object A in the list, the get method is used to obtain a new object B, and assign all its values to A. In this way, a obtains all its sub-object attributes when it is clicked.
Non-root object class:
Get method: Get the general attributes of this object. Its Sub-object attributes use the common attribute lazy loading method.
20100330 make the following corrections:
Obtain a single object:
Root. Get: Root + sub + all foreign keys.
Root. getlazy return: Root + all foreign keys.
Child. getchild: All foreign keys except the current parent. (After the parent object is called, the value of the parent node is set for all the child objects)
Get object set:
This method calls the root. Get method for each object.
Children. getchildren this method calls the child. getchild method for each object.
The preceding methods must be executed on the server.