public function _initSelect()
 {
     parent::_initSelect();
     $this->_joinFields();
     $this->_setIdFieldName('tag_relation_id');
     return $this;
 }
Example #2
0
 /**
  * Init collection of customers
  * @return AW_Referafriend_Model_Mysql4_Customer_Collection
  */
 protected function _initSelect()
 {
     parent::_initSelect();
     $select = $this->getSelect();
     $select->join(array('inv' => $this->getTable('referafriend/invite')), "e.entity_id = inv.referrer_id AND inv.referral_id <> '0'")->group('inv.referrer_id');
     return $this;
 }