Retrieval with Relation Depth¶
The Data Service API supports a mechanism for loading related objects without identifying each by its name. Instead, the API includes a parameter which specifies the "depth" of the relations to include into the response. Consider the following diagram:
The diagram shows a hierarchy for class structure - the
Order class has two relations: with
Customer classes. Each in turn has a relation to the
Address classes. When an instance or a collection of
Order objects is retrieved from Backendless, the API may include a parameter specifying the depth of relations to include into the response. If the relation depth is 1, then all related instances of
Customer will be included into each
Order object. If the relation depth is 2, then not only
Customer instances will be included, but the corresponding
Address objects as well.
Loading relations with relation depth retrieves only a partial set of the related objects (default size of the retrieved related collection is 10). To load additional related objects, use the Relation Paging API .
API methods supporting relations depth¶
xxxx.backendless.app is a subdomain assigned to your application. For more information see the Client-side Setup section of this documentation.
||name of the table from which the data is to be loaded.|
||depth of the relations to include into the response.|