title: Adding a Custom Backend Model to a Custom Attribute
body: <p>I am trying to  set a custom backend model for a custom attribute. The problem is that Magento prepends the 'Mage' directory to the path, so I can't keep all the files in my extension directory.</p>
  
  <p>Code:</p>
  
  <pre><code>$setup = new Mage_Eav_Model_Entity_Setup('core_setup');
  $setup-&gt;addAttribute('catalog_category', $postData['attribute_code'], array(
                          'label'      =&gt; $postData['frontend_label'],
                          'input'      =&gt; $postData['frontend_input'],
                          'backend'    =&gt; 'my_company/myextension_model_category_attribute_backend_file',
                          'required'   =&gt; $postData['is_required'],
                          'global'     =&gt; Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE,
                          'group'      =&gt; $postData['attribute_group_name'],
                          'sort_order' =&gt; $postData['sort_order']
  ));
  </code></pre>
  
  <p>Instead of the path being relative to my extension, 'Mage' gets prepended and results in this error:</p>
  
  <pre><code>Warning: include(Mage/My_Company/Model/My_Extension/Model/Category/Attribute/Backend/File.php): failed to open stream
  </code></pre>
  
  <p>I haven't found a solution that works with the addAttribute() method.</p>
  
  <p>In troubleshooting, it wasn't immediately clear where Magento is prepending the path.</p>
  
  <p>Everything renders fine (I'm using a file renderer), but it doesn't save correctly without the backend of course.</p>
  
  <p>I'm on Magento 1.6.1.</p>