title: Magento: object->save() does not insert to database
body: <p><code>model-&gt;save()</code> does not insert to database. Magento cache turned off.<br>
  I did not receive any issue, that is ok, but it does not insert to database.<br>
  My code below:</p>
  
  <pre><code>try
  {
      $cusSite = Mage::getModel('themeeditor/customersite');
                  $cusSite-&gt;setData(array("customer_id" =&gt; 1,
                                "website_id" =&gt; 1,
                                "store_group" =&gt; 1,
                                "store_id" =&gt; 1));            
                  $query = $cusSite-&gt;save();
  }
  catch(Exception $e)
  {
      echo $e-&gt;getMessage;exit;
  }
  </code></pre>
  
  <p>This is my <strong>code\local\FS\ThemeEditor\etc\config.xml</strong></p>
  
  <pre><code>   &lt;models&gt;
                  &lt;themeeditor&gt;
                      &lt;class&gt;FS_ThemeEditor_Model&lt;/class&gt;
                      &lt;resourceModel&gt;themeeditor_mysql4&lt;/resourceModel&gt;
                  &lt;/themeeditor&gt;
                  &lt;themeeditor_mysql4&gt;
                      &lt;class&gt;FS_ThemeEditor_Model_Mysql4&lt;/class&gt;
                      &lt;entities&gt;
                          &lt;customersite&gt;
                              &lt;table&gt;themeeditor_customersite&lt;/table&gt;
                          &lt;/customersite&gt;
                      &lt;/entities&gt;
                  &lt;/themeeditor_mysql4&gt;
              &lt;/models&gt;
  &lt;resources&gt;             
              &lt;themeeditor_setup&gt;
                  &lt;setup&gt;
                      &lt;module&gt;FS_ThemeEditor&lt;/module&gt;
                      &lt;class&gt;Mage_catalog_Model_Resource_Eav_Mysql4_Setup&lt;/class&gt;
                  &lt;/setup&gt;
                  &lt;connection&gt;
                      &lt;use&gt;core_setup&lt;/use&gt;
                  &lt;/connection&gt;
              &lt;/themeeditor_setup&gt;
              &lt;themeeditor_write&gt;
                  &lt;connection&gt;
                      &lt;use&gt;core_write&lt;/use&gt;
                  &lt;/connection&gt;
              &lt;/themeeditor_write&gt;
              &lt;themeeditor_read&gt;
                  &lt;connection&gt;
                      &lt;use&gt;core_read&lt;/use&gt;
                  &lt;/connection&gt;
              &lt;/themeeditor_read&gt;
          &lt;/resources&gt;
  </code></pre>
  
  <p>This is my <strong>code\local\FS\ThemeEditor\Model\Customersite.php</strong></p>
  
  <pre><code>&lt;?php
  
  class FS_ThemeEditor_Model_Customersite extends Mage_Core_Model_Abstract
  {
      public function _construct()
      {
          parent::_construct();
          $this-&gt;_init('themeeditor/customersite');
      }
  }
  </code></pre>
  
  <p>This is my <strong>code\local\FS\ThemeEditor\Model\Mysql4\Customersite.php</strong></p>
  
  <pre><code>&lt;?php
  
  class FS_ThemeEditor_Model_Mysql4_Customersite extends Mage_Core_Model_Mysql4_Abstract
  {   
      public function _construct()
      {    
          // Note that the billingaddress_id refers to the key field in your database table.
          $this-&gt;_init('themeeditor/customersite', 'customer_id');
      }
  }
  </code></pre>
  
  <p>This is my <strong>code\local\FS\ThemeEditor\Model\Mysql4\Customersite\Collection.php</strong></p>
  
  <pre><code>&lt;?php
  
  class FS_ThemeEditor_Model_Mysql4_Customersite_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
  {
      public function _construct()
      {
          parent::_construct();
          $this-&gt;_init('themeeditor/customersite');
      }
  }
  </code></pre>
  
  <p>This is my <strong>code\local\FS\ThemeEditor\sql\themeeditor_setup\mysql4-install-0.1.0.php</strong></p>
  
  <pre><code>&lt;?php 
  $installer = $this;
  
  $installer-&gt;startSetup();
  
  $installer-&gt;run("
  DROP TABLE IF EXISTS {$this-&gt;getTable('themeeditor_customersite')};
  CREATE TABLE {$this-&gt;getTable('themeeditor_customersite')}(
      `customer_id` int(10) unsigned NOT NULL,
      `website_id` int(10) unsigned NOT NULL,
      `store_id` int(10) unsigned NOT NULL,
      `store_group` int(10) unsigned NOT NULL,
      FOREIGN KEY (`customer_id`) REFERENCES {$this-&gt;getTable('customer_entity')} (`entity_id`) ,
      PRIMARY KEY (`customer_id`)
  )ENGINE=InnoDB DEFAULT CHARSET=utf8;");
  
  $installer-&gt;endSetup();
  </code></pre>
  
  <p>I don't know a reason it can not insert to database.</p>