Magento custom module model returns empty data array,what would be the issue.I am new to magento.Trying to create custom module.Please help me out.please check below screen
/Model/Suites.php:
<?php
class Bespoke_Suites_Model_Suites extends Mage_Core_Model_Abstract{
public function _construct(){
parent::_construct();
$this->_init('bespoke_suites/suites');
}
/Model/Resource/Suites.php :
<?php
class Bespoke_Suites_Model_Resource_Suites extends Mage_Core_Model_Resource_Db_Abstract{
public function _construct(){
//parent::_construct();
$this->_init('bespoke_suites/suites','suites_id');
}
}
config.xml
.....
<bespoke_suites_resource>
<class>Bespoke_Suites_Model_Resource</class>
<entities>
<suites>
<table>bespoke_suites</table>
</suites>
</entities>
</bespoke_suites_resource>
.....
Fatal error: Call to a member function getData()