Inside file app/code/core/Mage/Sales/etc/config.xml, there is:
<sales> <class>Mage_Sales_Model</class> <resourceModel>sales_resource</resourceModel> </sales> <sales_entity> <class>Mage_Sales_Model_Entity</class> <entities> <quote> <table>sales_quote</table> </quote> ... </entities> </sales_entity> <sales_resource> <class>Mage_Sales_Model_Resource</class> <entities> <quote> <table>sales_quote</table> </quote> ... </entities> </sales_resource>
What do these
<entities> tags represent exactly? How to interpret them? I see they contain all the table names, but how does the tables declared under
<sales> relate to the ones under
<sales_resource>? Why does
<sales> have a
<resourceModel> element and
<sales_entity> does not?
I would like to query shipping data related to orders, possibly joined with some other product and customer data. I am trying to figure out how to get the proper resource model object for sales_flat_shipment, then join it with
sales_flat_order_item for example.