Getting relations within the same table

Hey guys, I’m wondering how one would go about getting relations and the related objects within the same table. I’ve got a friends column in the Users table which has an one-to-many relationship with other user objects in the same table. I was wondering how I could get the friends of the current user and their individual properties, usernames and stuff. I’ve tried a lot of stuff but can’t seem to get it to work, any and all help is appreciated.

Thanks for your help

Hi Mudasar!

You need to check “autoload” checkbox for relations to be uploaded:</img>
Then you just retrieve the object that has a relation and the related object will be loaded too.

How would I go about getting the properties of the related object, like if i wanted to get test2’s bestFriend’s email/name.

Thanks again for helping