Retrieving Pointers
Critter opened this issue · comments
how can I get back the data included in a pointer?
I've tried:
$parseObject = new parseQuery("GroupList");
$parseObject->whereInclude("thegroups");
$parseObject->whereInclude("theuser");
but I do not get any extra data returned.
try:
$parseQuery = new parseQuery($class = 'GroupList');
$parseQuery->whereInclude('thegroups'); //should be the pointer in the GroupList class
If I do this:
$parseQuery = new parseQuery($class = 'GroupList');
$tmp = $parseQuery->whereInclude('thegroups');
$return = $parseQuery->find();
echo (json_encode($return));
I don't show any additional data. I would expect the associated records to be included, no?
http://f.cl.ly/items/0N1B03022F2h1a3o0f34/Screen%20Shot%202013-12-10%20at%201.54.25%20PM.png
I believe the sample below should work just fine and give you the records in the thegroups in the same resonse
$parseQuery = new parseQuery($class = 'GroupList');
$parseQuery->whereInclude('thegroups'); //should be the pointer in the GroupList cla
$return = $parseQuery->find();
echo (json_encode($return));
You're not doing anything with $tmp above, so that isn't going to work.
I /finally/ figured out why I was not getting any data back. One of the issues I saw come though in email (I think it might have been yours, actually) mentioned not getting any data back unless there was basically a 'where clause' added to the calls..
I added a bogus ->whereNotEqualTo(....)
and it returned all the data as expected...
thanks for your help.