title: How to override magento core model (model class file direct under app/code/core/Mage/Core/Model directory)
body: <p>I want to override an core model class, but I cannot find the correct way to do it. </p>
  
  <p>I have googled a lot, but some of the examples are shown how to override a model which are not located at <code>app/code/core/Mage/Core/Model</code> folder and some of the examples are shown how to override a model which in the sub-dir of <code>Core</code> dir, like <code>app/code/core/Mage/Core/Model/Resources/Eav/Mysql4/</code>. </p>
  
  <p>I have read the examples, but I still cannot find a way to override it. For example, I want to override <code>app/code/core/Mage/Core/Model/Store.php</code></p>
  
  <p>And here is the xml I use, but it is not working. Please help me to find out which part is wrong. Thanks in advance!</p>
  
  <p><code>app/etc/models/My_Core</code></p>
  
  <pre><code>&lt;config&gt;
      &lt;modules&gt;
          &lt;My_Core&gt;
              &lt;active&gt;true&lt;/active&gt;
              &lt;codePool&gt;local&lt;/codePool&gt;
          &lt;/My_Core&gt;
      &lt;/modules&gt;
  &lt;/config&gt;
  </code></pre>
  
  <p><code>app/code/local/My/Core/etc/config.xml</code></p>
  
  <pre><code>&lt;config&gt;
      &lt;modules&gt;
          &lt;My_Core&gt;
              &lt;version&gt;0.1.0&lt;/version&gt;
          &lt;/My_Core&gt;
      &lt;/modules&gt;
      &lt;global&gt;
          &lt;models&gt;
              &lt;my_core_store&gt;
                  &lt;rewrite&gt;
                      &lt;class&gt;My_Core_Model_Store&lt;/class&gt;
                  &lt;/rewrite&gt;
              &lt;/my_core_store&gt;
          &lt;/models&gt;
      &lt;/global&gt;
  &lt;/config&gt;
  </code></pre>
  
  <p>The new Store.php file is at <code>app/code/local/My/Core/Model/Store.php</code>. And the magento version is 1.8.1.0 </p>