Support Topics Documentation Slack YouTube Blog

Two Step Retrieval example

(Daniel Eckhart) #1

The SDK for Android Documentation for Backendless 3 provides an example of Two Step Retrieval involving an “Order” which has “items” which have a “manufacturer”. I am trying to update my Backendless 3 app to Backendless 5. My app uses a large custom class for an entity with many sub-entities stored in separate tables. Can you give me an example of Two Step Retrieval in Backendless 5 that uses the example from Backendless 3? The migration document is not too helpful on this point.

(Oleg Vyalyh) #2

Hi, Daniel.
You can just follow the example from documentation.

(Daniel Eckhart) #3

The example from the 5.0 documentation is not similar to the 3.0 documentation, upon which my app is modeled. Is there standalone documentation on the LoadRelationsQueryBuilder or the loadRelations function?

(Stanislaw Grin) #4

We have only this documentation, sorry.

(Daniel Eckhart) #5

Then, could you provide 3 or 4 lines of code to implement the 3.0 example in 5.0?

(Stanislaw Grin) #6

Why don’t you like the example described in the documentation? This is what you need, don’t you?

(Daniel Eckhart) #7

The documentation does not make clear how, or even if it’s possible, to have nested relations like “items” and “items.manufacturer” as in the earlier document. The relations in the 3.0 loadRelations function was an ArrayList of Strings which you could add( ) to, the LoadRelationsQueryBuilder has a setRelation function which seems to imply I have to retrieve the relations one at a time. API documentation should describe the functions, not just give examples.

(Mark Piller) #8

Hi Daniel,

The two-step retrieval (i.e. LoadRelationsQueryBuilder) in the current build of Android SDK allows retrieval of only one relation at a time. What you’re asking for is simply not possible in the current build of the product.