title: Magento 1.9 custom order attribute not saved (EAV_entity_text)
body: <p>In my customer Magento module I've added a custom attribute (hearedfrom) to an order, the attribute is set in the order object (get after set returns the values) but it doens't seem to get saved in the DB.</p>
  
  <p>mymodule/etc/config.xml    </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code> &lt;resources&gt;
     &lt;hearedfrom_setup&gt;
       &lt;setup&gt;
          &lt;module&gt;Brainworx_Hearedfrom&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;/hearedfrom_setup&gt;
  &lt;/resources&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>MySqlInstall</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>$installer = $this;
  
  $installer-&gt;startSetup();
  
  //get the entity type for orders
  $sql = "SELECT entity_type_id FROM ".$this-&gt;getTable('eav_entity_type')." WHERE entity_type_code='order'";
  Mage::Log("Hearedfrom: " .$sql);
  $row = Mage::getSingleton('core/resource')-&gt;getConnection('core_read')-&gt;fetchRow($sql);
     
  $attribute  = array(
   'type'   =&gt; 'text',
   'label'   =&gt; 'Hearedfrom',
   'visible'  =&gt; true,
   'required'  =&gt; false,
   'user_defined' =&gt; true,
   'searchable' =&gt; true,
   'filterable' =&gt; true,
   'comparable' =&gt; false,
  );
  //add attribute for the sale/order
  $installer-&gt;addAttribute($row['entity_type_id'], 'hearedfrom', $attribute);
  
  $installer-&gt;endSetup();</code></pre>
  </div>
  </div>
  </p>
  
  <p>The observer where I save a value in the new attribute.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>public function hookToOrderSaveEvent()
   {
    /**
    * NOTE:
    * Order has already been saved, now we simply add some stuff to it,
    * that will be saved to database. We add the stuff to Order object property
    * called "hearedfrom"
    */
    $order = new Mage_Sales_Model_Order();
    $incrementId = Mage::getSingleton('checkout/session')-&gt;getLastRealOrderId();
    $order-&gt;loadByIncrementId($incrementId);
    
    //Fetch the data from select box and throw it here
    $_hearedfrom_data = null;
    $_hearedfrom_data = Mage::getSingleton('core/session')-&gt;getBrainworxHearedfrom();
    //$this-&gt;_getRequest()-&gt;getPost(‘myCustomerOrderComment’, false);
    Mage::Log("Order brought by: ".$_hearedfrom_data);
    
    //Save fhc id to order obcject
    $order-&gt;setData(self::ORDER_ATTRIBUTE_FHC_ID, $_hearedfrom_data);
    Mage::Log("test: ".$order-&gt;getHearedfrom());
    $order-&gt;save();
   }</code></pre>
  </div>
  </div>
  </p>
  
  <p>In my log I can see the value before and after setting it in my $order.
  The Data has an entry for the value.
  In the DB I can see an enty in EAV_ATTRIBUTE linked to EAV_ENTITY_TYPE and EAV_ENTITY_ATTRIBUTE.
  But I would expect the saved value to be in EAV_ENTITY_TEXT which doesn't contain any records.</p>
  
  <p>After reloading the placed order it doesn't contain the customer attribute.</p>
  
  <p>What am I missing here?</p>
  
  <p>Thanks</p>