private function setModel($row) { $userTo = $row->findParentRow('Application_Model_DbTable_User', 'To'); $userFrom = $row->findParentRow('Application_Model_DbTable_User', 'To'); $model = new Application_Model_Message(); $model->setId($row->id)->setStatus($row->status)->setRead($row->read)->setToId($row->to_id)->setFromId($row->from_id)->setSubject($row->subject)->setBody($row->body)->setAddedDate($row->addedon)->setUpdateDate($row->updatedon)->setUserTo($userTo)->setUserFrom($userFrom); return $model; }