Backendless Support
 
Answered

Load related objects

Hi,

I'm having problems identifying how to return related objects content in one step retrieval.

Just a simple example. If I have a Team that has many Players and a team belongs to one registered user, in ER DB in order to get the data I would do something like:

  1. select t.*, p.* from Team t, Players p where t.userId = «user_id» and t.objectId = p.teamid

How can I get the same data in backendless in one step retrieval?

Thanks

Leave a Comment

Comments (1)

photo
1

Hi,

If you have a team object and you need to load it's Players, you would use the approach described in the docs for "single step retrieval", but you also add the following where clause:

objectId = 'your-team-objectId'

Mark