Skip to content

Instantly share code, notes, and snippets.

@xcommerce-gists
Last active January 3, 2016 22:49
Show Gist options
  • Save xcommerce-gists/8531091 to your computer and use it in GitHub Desktop.
Save xcommerce-gists/8531091 to your computer and use it in GitHub Desktop.
Sample Magento config.xml showing how models are defined
<config>
<modules>
<!-- omitted for brevity -->
</modules>
<global>
<models>
<magentostudy_news>
<class>Magentostudy_News_Model</class>
<resourceModel>news_resource</resourceModel> <!-- Resource model name -->
</magentostudy_news>
<news_resource>
<class>Magentostudy_News_Model_Resource</class> <!-- Class name specifies the model prefix -->
<entities>
<news>
<table>magentostudy_news</table> <!-- DB table name -->
</news>
</entities>
</news_resource>
</models>
<!-- Other content omitted for brevity -->
</global>
</config>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment