views:

1103

answers:

2

Outside of the source code, is there any extensive documentation on the Magento ORM? I get the basics, and can usually dig through the Mage code base, litter it with Mage::Log calls and figure out something that works, but my efficiency would go way up if I had a high level overview of how the models are intended to be used. How do the aggregate methods work, what's the best way to join, when should you extend the models, when's the best time to use the eav models vs. the non-eav ones, etc.

Something like the Django Model Documentation, but for Magento.

+3  A: 

While there isn't much documentation on the ORM, here were a few pages that greatly helped in my understanding of the database structure which will help you understand everything else:

http://www.magentocommerce.com/wiki/development/magento_database_diagram http://www.magentocommerce.com/boards/viewthread/7359/

James Skidmore
+2  A: 

For the Magento ORM which is based off of Zend Framework's Zend_Db_Adapter , you can use the Zend Framework Programmers Reference (Available as a free pdf on Zend Framework's site ). I also found this link helpful for learning more about Magento models.

Rick J
Good info, but not quite what I'm looking for. Magento uses Zend_Db_Adapter to make all its database calls, but the actual ORM (mapping database table to objects) inherits from the core Varian Object. The ORM **uses** Zend_Db_Adapter to talk to databases. I'm interested in documentation of the ORM itself (if it exists and if doesn't vary wildly between Models)
Alan Storm