2

This is something that I struggled with, and couldn't find a quick answer for. Ultimately, I realized that I wasn't reviewing the Parse documentation properly.

Problem

If you're reading this question, perhaps you're getting the following error in your Cloud Code error log

Result: TypeError: Cannot call method '_toPointer' of null

when you try to call the .query() method of a Parse.Relation.

1 Answer 1

7

Solution

Consider that you may be retrieving the relation incorrectly, in the first place. I spent quite a while struggling to understand why, if I called the .get('RELATION_KEY') method of a Parse.Object, I kept getting this error.

I should have been calling .relation('RELATION_KEY') instead. I know this is was in the Parse.Object documentation, but I saw "get" and stopped reading. My mistake.

Hope it helps.

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.