Hello,
I am new to Backendless and I have read all the documentation about relations, but I can’t figure out a way to solve this problem. I have also read FAQ’s but they are targeting different situations. I need a solution for this specific case. So I have two tables Users and FriendRequst. These two tables are not in relationship with each other.
Users Table
ObjectId
Name (STRING)
Password (STRING)
Image
FriendRequest Table
toUser (STRING) // this column contains ObjectId of User to whom friend request is send
fromUser (STRING) // this column contains ObjectId of User who has send friend request
accepted (BOOLEAN)
Now I want to do two things
(1) Make a call to FriendRequest Table that gets a collection of friend requests to specific User by using its ObjectId (for example: currentUserId)
BackendlessDataQuery query = new BackendlessDataQuery();
query.setWhereClause(String.format(“toUser = ‘%s’”, currentUserId));
(2) Now I want to use some method that can get me BackendlessUser Objects for the collection of friend requests from USER Table
NOTE:
I have attached pictures of my tables to make it more clear
( Sorry if my explanation is not clear )