Let’s say you have a class name Space_Module_Model_LongModelName and you want to reference it as:
Mage::getModel('module/longmodelname');
This seems to work in some development environments, but doesn’t seem to work in all environments. Probably has to do with a file system case sensitivity setting.
The error that you get in environments where it doesn’t work is that the include() for Space/Module/Model/Longmodelname.php failed.
You have a config-node in your config.xml called global/models/yourpackage in which you save your Prefix for your class models.
When you call Mage::getModel(‘packagename/classname’) Magento fetches this config node e.g. Company_Yourmodule_Models adds a _ and then the classname with uppercase first letter:
Company_Yourmodule_Models_Classname
if you have cAMElcaSe classnames, it is the same way. So let’s say your class’ name is ClassName then you have to call Mage::getModel(‘packagename/className’) and magento resolves it to: Company_Yourmodule_Models_ClassName