0

How can I create a Parse Pointer object using the object ID? I have tried the below and several variations with no success.

$obj = new ParseObject("App");
$obj->setAssociativeArray('__type' => 'Pointer', 'className' => 'App', 'objectId' => 'cZtFWprxBe');

1 Answer 1

1

From the source code given in https://github.com/ParsePlatform/parse-php-sdk/blob/master/src/Parse/ParseObject.php

you can create pointers using either

$p = ParseObject::create($className, $objectId , $isPointer);

or

$p = new ParseObject($className, $objectId , $isPointer);

Set the third argument $isPointer to true when creating a pointer to an object.

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.