예제 #1
0
파일: Group.php 프로젝트: omusico/logica
 /**
  * Overrides App_Model::getQuery()
  * 
  * @access protected
  * @return void
  */
 protected function _select()
 {
     $select = parent::select();
     $select->setIntegrityCheck(FALSE);
     $select->from(array('g' => $this->_name));
     $select->joinLeft(array('t' => $this->_name), 'g.parent_id = t.id');
     $select->order('g.parent_id ASC');
     $select->reset(Zend_Db_Table::COLUMNS);
     $select->columns(array('g.*', 't.name AS parent_name'));
     return $select;
 }