Hello,
I'm using Zend Framework version 1.7.8.
I am trying to create a class that extends from Zend_Db_Table_Abstract:
class My_Model_Table extends Zend_Db_Table_Abstract {
public function __construct($tableName) {
parent::__construct(array('name' => $tableName, 'primary' => 'dummy', 'db' => Zend_Registry::get('dbAdapter')));
}
}
However, when I try to fetch from this table:
$table = new My_Model_Table('dual');
Zend_Debug::dump($table->fetchAll());
I am getting this exception:
Primary key column(s) (dummy) are not columns in this table (DUMMY)
For those of you not familiar with Oracle, the DUAL table is a standard Oracle table which has only one column: DUMMY. From what I can see in the error message, ZF is trying to fetch from the "DUMMY" table which doesn't exist. Am I right? What am I doing wrong?
Thanks!