2

I am working on parse.com android sdk. I am working on USER table in which i have to store the value of pointer from another table , for example Object ID from UserInfo table in info column in USER table. For Current User i can easily get and set values by using ParseUser object like:

final ParseUser user = ParseUser.getCurrentUser();

        String currentUserId = user.getCurrentUser().getObjectId();
        String currentUserFirstName = user.getString("firstName");
        String currentUserLastName = user.getString("lastName");
        String currentUserEmail = user.getCurrentUser().getEmail();
        String currentUserContactNumber = user.getString("contactNumber");

Kindly tell me how to save my ObjectID from UserInfo table in info column in USER table .

1 Answer 1

3

I assume you already have the info column added as a Pointer to UserInfo

set pointer

user.put("info", ParseObject.createWithoutData("UserInfo","$userInfoId"));

get pointer

ParseObject userInfo = user.getParseObject("info");
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.