Table A has a column named components with is a one to many data relationship to itself (Table A).
Components is set to autoload.
Row 1 has an empty list of components,
Row 2 has 1 component: Row 1.
https://api.backendless.com/v1/data/TableA correctly returns:
{
"offset": 0,
"data": [
{
"components": [],
...
},
{ "components": [
{
"components": [],
...
}
],
...
}
}
However, a specific search:
https://api.backendless.com/v1/data/TableA/[objectId]
{
"components": [
{
"components": null,
...
}
],
...
}
Only loads the first level, regardless of relations depth. This null is my problem, shouldn’t it be []?
(https://api.backendless.com/v1/data/TableA/[objectId]?relationsDepth=5 returns the same thing).
Specifying the relationship to load works:
https://api.backendless.com/v1/data/TableA/[objectId]?loadRelations=components
{
"components": [
{
"components": [],
...
}
],
...
}
I thought the point of autoload was that you didn’t need to specify the loadRelations? (as is the case in the first REST call above).