问题出现于使用Grid时,解决方案。在使用的Model处添加
public function _construct() { parent::_construct(); $this->_init('employee/employee'); }
其中init内的数值由下面的函数决定
protected function _prepareCollection() { $collection = Mage::getModel('employee/employee')->getCollection(); $this->setCollection($collection); return parent::_prepareCollection(); }