Backendless Support
 
Solved

Custom property relationship to other table in Users table

Hello,

I have a Users table with custom property that is relationship to other table. However when I fetch User data this custom property is always null although I controlled in Backendless dashboard that it's not empty. How can I fetch data from Users table relationship?

Thanks

Leave a Comment

Comments (4)

photo
1

Hey Wojtek,

For getting relations you have a few variants

- use loadRelations=[RELATED-PROPERTY-NAME] as query param (for REST)

- use relationsDepth=[RELATIONS-DEPTH-VALUE] as query param (for REST)

- enable "Autoload" toggler in column head in DataBrowser

more info you can find here: https://backendless.com/documentation/data/rest/data_relations_retrieve.htm

Regards, Vlad

photo
1

Hey,

I'm using relationsDepth parameter set to 2, this problem occurs to me only in "Users" table with custom properties. In other table relationships load just fine.

Regards,

Wojtek

photo
1

please provide your appId I will try to investigate it

photo
1

Hi,

After enabling "Autoload" and fetching user by id it works, and this custom property is populated, although when I get it using backendless?.userService.currentUser it's empty, but fetching it by id is ok for me.

Thanks a lot for quick response!