Hi, I have a project in which I use more than one adapter. So In ma models i created an abstract model
abstract My_Config1_Model extends Zend_Db_Table_Abstract
{
public function init()
{
$db = Zend_Registry::get('dbcon')->getDb(Kiga_Data_Database::MASTER);
$this->setDefaultAdapter($db);
}
}
and then I inherit this abstaract class like:
class MyModel extends My_Config1_Model
{
protected $_name = 'mytable';
protected $_primary = 'id';
protected $_rowClass = 'MyRow';
}
class MyRow extends Zend_Db_Table_Row_Abstract
{
}
and the in my controller I try:
$table = new MyModel();
when I fetch alll it works:
$results = $table->fetchAll(); // works fine
but when I try to filter it it does not work:
results = $table->fetchRow("id = 1"); // Does not work. I get the error Error: No adapter for type MyRow.
Anybody any Idea? Thanks.
I forgot I use also paginator
$paginator = Zend_Paginator::factory($results);