title: Error in SetData() in magento?
body: <p>I am trying to update a custom field of customer_entity in magento I am using the following code:</p>
  
  <pre><code>$customer = Mage::getModel('customer/customer')-&gt;load($customerId);
  
       print_r($customer-&gt;getData());
       try {   
                       $customer-&gt;setData('field', $flag);
           $insertId = $customer-&gt;save()-&gt;getId();
               echo "Data successfully inserted. Insert ID: ".$insertId;
                        print_r($customer-&gt;getData());
          } catch (Exception $e){
           echo $e-&gt;getMessage();  
          }
  </code></pre>
  
  <p>Now I does not get why it is not saving in a database, when i write the log customer data has the updated value, but when i try to  see in the database it is not reflecting.</p>
  
  <p>Any Idea?</p>
  
  <p>Edited:</p>
  
  <pre><code>$write = Mage::getSingleton("core/resource")-&gt;getConnection("core_write");
          $sql = "update `customer_entity` set `field` = ".$flag." where`entity_id` =".$customerId;
          $write-&gt;query($sql);
  </code></pre>
  
  <p>This code is working with charm but the above code nention at the top does work.
  Does any body have any idea?</p>