0

I have one Parse object in my user table and I added some data to it in one column. When I reference this data straight away it shows as undefined but when I retrieve the object through a query it shows the data. What is going on here?

console.log(Parse.User.current().get("contractorCode"))//this is undefined

var query = new Parse.Query(Parse.User);
query.get(Parse.User.current().id, {
     success: function(test){
     console.log("test", test.get("contractorCode"));//this returns the data
     }
   })

What is going on here and how do I get the data recognized in Parse without the extra query? It seems as if it needs to be in there a certain amount of time to refresh (which I actually pushed on both the browser and on the Parse dashboard set up). Is this so or am I missing something?

1 Answer 1

0

When this happens you must log out of your app and back in. It has something to do with the new sessions feature by Parse.

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.