getTable() && $this->getPkFieldName()) { $collection->joinTable( $this->getTable(), $this->getPkFieldName().'=entity_id', array('affected_product_id'=>$this->getPkFieldName()) ); } return $this; } public function getIdsSelect($dbAdapter) { if ($this->getTable() && $this->getPkFieldName()) { $select = $dbAdapter->select() ->from($this->getTable(), $this->getPkFieldName()); return $select; } return ''; } }