|
I got a problem loading a second model handling a database with a module.
I got 1 controller ValidateController and 2 Models Main that extends Mage_Core_Controller_Front_Action so I can’t communicate with the database, and Log that communicates with the database.
When I call $log = Mage::getModel(’modulex/log’); it is fine it gives me the correct path for with get_class($log) but when I call $log->load($params[’id’]); it fails giving me this error:
Warning: include(Companyx/Modulex/Model/Resource/Main.php) [function.include]: failed to open stream: No such file or directory
I don’t see why it gives me this error, it should call Resource/Log.php that exists.
I show you my config.xml
<frontend> <routers> <modulex> <use>standard</use> <args> <module>Companyx_Modulex</module> <frontName>modulex</frontName> </args> </modulex> </routers> </frontend> <global> <models> <modulex> <class>Companyx_Modulex_Model</class> <resourceModel>modulex_resource</resourceModel> </modulex> <modulex_resource> <class>Companyx_Modulex_Model_Resource</class> <entities> <log> <table>companyx_modulex_logs</table> </log> </entities> </modulex_resource> </models> </global>
Thank you for your help !
|