问题描述:

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 .

网友答案:

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");
相关阅读:
Top