Loading Relations of Relations

Hello,
I’m writing an API service to retrieve a row from TableA which has a “routes” column with 1toN relations to TableB which has an “offers” column with 1toN relations to TableC. Using two-step method.

I am trying to retrieve one TableA record containing all of its TableB and TableC descendants. Sadly, for each TableA row, there are about 103 TableB rows. So I am using LoadRelationsQueryBuilder in a loop to get the relations in 100 row chunks. No problem. However, I have not been able to get the TableC relations to show up under any circumstances, in two calls. I have played with calling loadRelations with a greater query depth, and using setRelated with both [“routes”], and [“routes.offers”], but no TableC offers are ever returned. This already an expensive operation, do I need to make 3 calls to get all the relationships, or am I just doing it incorrectly? In a nutshell, I am doing:

let lrqb = Backendless.LoadRelationsQueryBuilder.create()
lrqb.setRelationName("routes")
lrqb.setPageSize(100)
lrqb.setRelationsDepth(2)
lrqb.setRelated(["offers"])   // or ["routes.offers"]
const items = await Backendless.Data.of("TableA").loadRelations(tableAId, lrqb)

Thank you, Kelly

Hello @Kelly_Oglesby

Could you please provide your AppID?
Do you have any roles/permissions for these tables/users?

Regards, Vlad

It is 8149FCCE-07DA-F988-FFBB-6154872C9500, and as yet, no permissions. If you are going to look at the actual projects, the real table names and relation columns are:

schedules.routes
schedrts.offers
offers

If I do one call and use setRelated([“routes.offers”]) in the DataQueryBuilder, it gives me exactly what I want, but only 10 relation records. I need them all.

Thanks, Vladimir

thanks, we are looking into it