- I want to create a model for a DB table called "contactform_contact_list"
- NameSpace is 'Chandan', ModuleName : 'Contactform'
- So, my app/code/local/Chandan/Contactform/etc/config.xml is like this :
like this:
<models>
<contactform>
<class>Chandan_Contactform_Model</class>
<resourceModel>contactform_resource</resourceModel>
</contactform>
<contactform_resource>
<class>Chandan_Contactform_Model_Resource</class>
<entities>
<contactform>
<table>contactform_contact_list/table>
</contactform>
</entities>
</contactform_resource>
</models>
app/code/local/Chandan/Contactform/controllers/IndexController's indexAction() is like this ::
$contact = Mage::getModel("contactform/contact"); $contact->load($params['id']);
app/code/local/Chandan/Contactform/Model/Contact.php is like this ::
class Chandan_Contactform_Model_Contact extends Mage_Core_Model_Abstract { protected function _construct() { $this->_init('contactform/contact'); }
}
However, it is giving me this error : Can't retrieve entity config: chandan_contactform/contact
What I am missing here? Any help is highly appreciated.