Loose loading in gix4

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.