/** * Set entity to use for attributes * * @param Mage_Eav_Model_Entity_Abstract $entity * @return Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Collection */ public function setEntity($entity) { if ($this->isEnabledFlat() && $entity instanceof Mage_Core_Model_Mysql4_Abstract) { $this->_entity = $entity; return $this; } return parent::setEntity($entity); }