protected function fetchChildren($obj, $returnValue) { $returnValue = parent::fetchChildren($obj, $returnValue); $q = Doctrine_Query::create()->select('ID')->from('ContactValue')->where('orgID = ?', $this->getOrgID())->andWhere('isRedFlag = 1'); $temp = $q->execute(array(), Doctrine::HYDRATE_NONE); $redFlags = array(); foreach ($temp as $id) { $redFlags[] = $id[0]; } $returnValue['staffList'] = implode(',', $redFlags); return $returnValue; }