当前位置: 动力学知识库 > 问答 > 编程问答 >

How to put data in pointer filed using parse.com android

问题描述:

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");
分享给朋友:
您可能感兴趣的文章:
随机阅读: