I can successfully do getModel(module/licenses) but then when I load($id) things break.
My database table is setup fine called licenses.
my config file has in the global -> modules tag
<modulename>
<class>NameSpace_Module_Model></class>
<resourceModel>module_mysql4</resourceModel>
</modulename>
<modulename_mysql4>
<class>NameSpace_Module_Model_Mysql4</class>
<entities>
<licenses>
<table>licenses</table>
</licenses>
</entities>
</modulename_mysql4>
然后,我有一份档案存放在我的模型/镜头上。 网址:<代码> 姓名 Mage_Core_Model_Abstract , 并包括一个星体功能,该功能为$this->_init(模块/执照)
我在模型/Mysql4/Licenses的模块中也有一个档案。 php with the category Namespace_Module_Model_Mysql4_Model_Licenses Expansion Mage_Core_Model_Mysql4_Abstract
with a Constructionor which do $this->_init(模块/licenses , main here )
这一类别似乎从未出现过,因为我增加了一次从来似乎从未运行的“var”撤离。
So I can get my model and dump it onto the screen but if I do a load($id) things die without warning in any log files. If I run it in a try catch i still get nothing. If I run a ->getResource() instead in a try catch and dump out the exception it gives a message that Mage registry key "_resource_singleton/module/licenses" already exists.
因此,如何适当设定表格的模型?