0

I have created a model that uses unique string as ID field, no issue for saving it after setting protected $_isPkAutoIncrement = false; in Mysql4 resource however I'm facing an issue when I try to load it:

->load('mystrinid') return me this error:

Invalid method MY_MODULE_Model_Mymodel::load(Array
(
    [0] => mystrinid
)

UPDATE:

this is working

3

Both Mage_Core_Model_Abstract (the model) and Mage_Core_Model_Resource_Db_Abstract / Mage_Core_Model_Mysql4_Abstract (resource model) define load(), so there's something amiss with your class inheritance.

| improve this answer | |
  • Agreed. @Francesco, can you post your class definition? Also you module is named : MY_MODULE ? with clas myModel? You should name the properly ;) – ProxiBlue Feb 2 '13 at 16:16
  • you are right it is working fine – Fra Feb 2 '13 at 16:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.