Support Topics Documentation Slack YouTube Blog

Autoload relation pageSize


(Francesco Signorile) #1

I have an object with more than 100 related objects. Autoload is checked, so when I call a query for that object, I retrieve all the related objects.
I thought that with autoload enabled, I could retrieve only 100 objects at time but I can retrieve all the objects related to the main object and they are more than 100, 153 to be exact…


(Mark Piller) #2

Francesco,

Currently Backendless returns all related objects when auto-load is turned on. This will be changing soon as we’re introducing paging for the related entities.

Regards,
Mark


(Jonathan ) #3

What is the way to get more than 10 relations and also get the relations’ relations? LoadRelationsQueryBuilder on iOS seems very limiting in that it can’t get the relations of my relations. Does autoload work to get these relations and can I get more than 10, say 30 child relations?


(Sergey Chupov) #4

With autoload you can only get 10 relations. To load more, you can use LoadRelationsQueryBuilder. To load relations of relations, you just need to specify them dot-separated, e.g. “shop.owner” if you have relation column “shop” to a table containing a relation column “owner”.


(Jonathan ) #5

So if I have an Franchise object that has 20 shops in “shop” column and each shop has 20 owners in “owner” and each owner has 20 employees in “employee” column then you’re saying if I use LoadRelationsQueryBuilder and pass the argument “shop.owner.employee” and it will return all of the shops, owners, and employees of the franchise?


(Sergey Chupov) #6

Yes, exactly. Specifying “shop.owner.employee” as a relation to load will load all the employees, owners and shops down this chain.