Skip to content

Instantly share code, notes, and snippets.

@jahvi
Last active November 1, 2015 11:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jahvi/e78b930139f7b08426f2 to your computer and use it in GitHub Desktop.
Save jahvi/e78b930139f7b08426f2 to your computer and use it in GitHub Desktop.
Register Magento resource
<global>
<models>
<custom_module>
<class>Custom_Module_Model</class>
<resourceModel>module_mysql4</resourceModel>
</custom_module>
<module_mysql4>
<class>Custom_Module_Model_Mysql4</class>
<entities>
<custom_module>
<table>custom_table</table>
</custom_module>
</entities>
</module_mysql4>
</models>
<resources>
<custommodule_setup>
<setup>
<module>Custom_Module</module>
</setup>
<connection>
<use>core_setup</use>
</connection>
</custommodule_setup>
<custommodule_write>
<connection>
<use>core_write</use>
</connection>
</custommodule_write>
<custommodule_read>
<connection>
<use>core_read</use>
</connection>
</custommodule_read>
</resources>
</global>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment