Hi,
I am trying to understand how the parameter “relationsDepth” works . On my online console I have defined 3 objects in a 3-level nested relationship:
- TestMaster (top level)
- TestChildLevel1 ( related to TestMaster, first level)
- TestChildLevel2 (related to ChildObjLevel1, second level)
When I run a query using relationsDepth = 2, details objects are not fetched (specifically TestChildLevel1 is an empty array). Here is a simplified version of my code (javascript-typescript es5):
var query = new Backendless.DataQuery();
query.options ={
relationsDepth: 2
}
Backendless.Persistence.of('TestMaster').find( query, ...)
But when I explicitly mention “TestChildLevel1” via the options.relations array in the option query, then this detail is properly returned, nested in its master object. So how does this parameter work?
Thank you.