title: Magento: Adding a custom entity
body: <p>Im creating an extension that adds extra functionality to the review model. I've created a database table and I need to add it as an entity in the etc/config.xml file. In the review config.xml it creates entities with the following:</p>
  
  <pre><code>&lt;models&gt;
          &lt;review&gt;
              &lt;class&gt;Mage_Review_Model&lt;/class&gt;
              &lt;resourceModel&gt;review_mysql4&lt;/resourceModel&gt;
          &lt;/review&gt;
          &lt;review_mysql4&gt;
              &lt;class&gt;Mage_Review_Model_Mysql4&lt;/class&gt;
              &lt;entities&gt;
                  &lt;review&gt;
                      &lt;table&gt;review&lt;/table&gt;
                  &lt;/review&gt;
                  &lt;review_detail&gt;
                      &lt;table&gt;review_detail&lt;/table&gt;
                  &lt;/review_detail&gt;
                  &lt;review_status&gt;
                      &lt;table&gt;review_status&lt;/table&gt;
                  &lt;/review_status&gt;
                  &lt;review_entity&gt;
                      &lt;table&gt;review_entity&lt;/table&gt;
                  &lt;/review_entity&gt;
                  &lt;review_aggregate&gt;
                      &lt;table&gt;review_entity_summary&lt;/table&gt;
                  &lt;/review_aggregate&gt;
                  &lt;review_store&gt;
                      &lt;table&gt;review_store&lt;/table&gt;
                  &lt;/review_store&gt;
                  &lt;review_parent&gt;
                      &lt;table&gt;review_parent&lt;/table&gt;
                  &lt;/review_parent&gt;
              &lt;/entities&gt;
          &lt;/review_mysql4&gt;
      &lt;/models&gt;
  </code></pre>
  
  <p>And this is what I have so far (excluding the entity)</p>
  
  <pre><code>&lt;config&gt;
  &lt;modules&gt;
      &lt;XXX_CustomerReview&gt;
          &lt;version&gt;0.1&lt;/version&gt;
      &lt;/XXX_CustomerReview&gt;
  &lt;/modules&gt;
  &lt;global&gt;
      &lt;models&gt;
          &lt;review_mysql4&gt;
              &lt;rewrite&gt;
                  &lt;review&gt;XXX_CustomerReview_Model_Mysql4_Review&lt;/review&gt;
              &lt;/rewrite&gt;
          &lt;/review_mysql4&gt;
      &lt;/models&gt;
  &lt;/global&gt;
  </code></pre>
  
  <p></p>
  
  <p>I can't get my head round how I do this, any help would be grateful.</p>