andrewscofield / parse.com-php-library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

matches query in parse php

manojvelyalan opened this issue · comments

Hi,
I have two classes Request and _user.I want to match aasignedUser field from Request to _user.My code is below

  $query = new \Parse\ParseQuery("Requests");
    $query->equalTo('assignedUser',$currentUser);
        $innerQuery = new \Parse\ParseQuery("_User");
        $innerQuery->equalTo('email', $email);
        $query->matchesQuery("assignedUser", $innerQuery);
    $query->descending("createdAt");
    $results = $query->find();       
    return $results;

I am getting the following error..
Fatal error: Cannot use object of type Parse\ParseUser as array in C:\xampp\htdocs\src\Parse\ParseQuery.php on line 103