我有這樣的全局配置:在我mysql4安裝-0.1.0.php文件如何讓Magento的表名
<global>
<models>
<subscriber>
<class>Giftlab_Subscriber_Model</class>
<resourceModel>subscriber_resource</resourceModel>
</subscriber>
<subscriber_resource>
<class>Giftlab_Subscriber_Model_Resource</class>
<entities>
<records>
<table>subscriber_records</table>
</records>
</entities>
</subscriber_resource>
</models>
<resources>
<giftlab_subscriber_write>
<connection>
<use>core_write</use>
</connection>
</giftlab_subscriber_write>
<giftlab_subscriber_read>
<connection>
<use>core_read</use>
</connection>
</giftlab_subscriber_read>
<giftlab_subscriber_setup>
<setup>
<module>Giftlab_Subscriber</module>
<class>Giftlab_Subscriber_Model_Resource_Setup</class>
</setup>
<connection>
<use>core_setup</use>
</connection>
</giftlab_subscriber_setup>
</resources>
</global>
,我需要的表名。我該怎麼做? 我知道它是這樣的:
$this->getTable('subscriber_resource/records')
但是,只有產生異常Can't retrieve entity config: subscriber_resource/records
。我需要做什麼來檢索表名?
說實話,我總是知道表名,$ this-> getTable('some/thing')只是添加了前綴和後綴。所以實際上,如果你屁股的名稱表工作 – Soundz 2013-02-28 14:36:05