model - Magento 1.9 custom module with custom database table not saving -


i have developed custom module has custom database table. however, cannot insert records since presented following error:

fatal error: call member function begintransaction() on boolean in /httpdocs/includes/src/__default.php on line 6105 

here code trying:

$data = array(           'voucher'     => 'voucher',           'customer_name' => 'customer_name',           'order'           => 'order',           'value'           => 'value',           'status'      => 1,           'date'            => '',         ); $model = mage::getmodel('antikatavoles/antikatavoles')->setdata($data); 

and config file:

<?xml version="1.0" ?> <config>  <modules>     <id_antikatavoles>         <version>0.1.0</version>     </id_antikatavoles> </modules>  <frontend>     <routers>         <antikatavoles>             <use>standard</use>             <args>                 <module>id_antikatavoles</module>                 <frontname>antikatavoles</frontname>             </args>         </antikatavoles>     </routers> </frontend>   <global>     <models>         <antikatavoles>             <class>id_antikatavoles_model</class>             <resourcemodel>antikatavoles_mysql4</resourcemodel>         </antikatavoles>         <antikatavoles_mysql4>             <class>id_antikatavoles_model_mysql4</class>             <entities>                 <antikatavoles>                     <table>antikatavoles</table>                 </antikatavoles>             </entities>         </antikatavoles_mysql4>     </models>     <resources>         <antikatavoles_setup>             <setup>                 <module>id_antikatavoles</module>             </setup>             <connection>                 <use>core_setup</use>             </connection>         </antikatavoles_setup>         <antikatavoles_write>             <connection>                 <use>core_write</use>             </connection>         </antikatavoles_write>         <antikatavoles_read>             <connection>                 <use>core_read</use>             </connection>         </antikatavoles_read>     </resources>     <helpers>         <antikatavoles>             <class>id_antikatavoles_helper</class>         </antikatavoles>     </helpers> </global>  </config> 

can me figure 1 out?

thanks!

edit:

my model , resource model:

class id_antikatavoles_model_antikatavoles extends mage_core_model_abstract {     public function _construct()     {         parent::_construct();         $this->_init('antikatavoles/antikatavoles');     } }  class id_antikatavoles_model_mysql4_antikatavoles extends mage_core_model_mysql4_abstract {     public function _construct()     {           $this->_init('antikatavoles/antikatavoles', 'antikatavoles_id');     } } 


Comments

Popular posts from this blog

Spring Boot + JPA + Hibernate: Unable to locate persister -

go - Golang: panic: runtime error: invalid memory address or nil pointer dereference using bufio.Scanner -

c - double free or corruption (fasttop) -