I'm trying to retrieve the data from a pointer in my parse.com database from the class User which field is "companyId" Pointer Company (It gets the company objectId from the class Company) to add that data in another table called Note into a field called companyId when creating an object.
This is my parse.com database:
Class Name: User
objectId String|companyId Pointer Company|username String |password String
Class Name: Note objectId String| companyId String |text String
I've look for solutions and I don't find anyone as I don't know how to retrieve the companyId value as it is a Pointer.
Thanks in advance for any repply.
EDIT: Problem solved, below there is how it worked for me and other way of solving it by "bigdee94".
Thanks!
One mate helped me and here is how we solved it:
Note n = new Note();
ParseUser user = ParseUser.getCurrentUser();
ParseObject userObj= user.getParseObject("companyId");
note.put("companyId", userObj.getObjectId().toString());
I founded kinda tricky as if you do try as:
Note n = new Note();
ParseUser user = ParseUser.getCurrentUser();
user.getParseUser("companyId");
It won't give the data in the field, I believe you get the memory access where the data is.
Thanks for your time, hope this helps more people!