/** * Query on the parent class where child is in the relation * * @param LeanObject $child Child object * @return LeanQuery */ public function getReverseQuery(LeanObject $child) { $query = new LeanQuery($this->parent->getClassName()); $query->equalTo($this->key, $child->getPointer()); return $query; }