Q:

Override returned values from Model

Is it possible to override values from Model->fetchAll() so it work globally. I have tried to override this in model, but does not work:
class Application_Model_DbTable_OdbcPush extends Zend_Db_Table_Abstract
{

    public function __get(string $col)
    {
        $res = parent::__get($col);
        if ($col == "lastrun") {
            $res = ($res == "1912-12-12 00:00:00+07" ? NULL : $res);
        }
        return $res;
    }
    //...
}

In a controller:
    $odbcModel = new Application_Model_DbTable_OdbcPush();
    $rs = $odbcModel->fetchAll( $select );

I want to override value returned from fetchAll(), find() etc when col name is "lastrun";

A:

Found the answer, for community i share here :D
http://framework.zend.com/manual/1.12/en/zend.db.table.row.html
So we have to overload Zend_Db_Table_Row and assign it to model/dbtable:
class Application_Model_DbTable_Row_OdbcPush  extends  Zend_Db_Table_Row_Abstract
{

     // do some override here

}

class Application_Model_DbTable_OdbcPush extends Zend_Db_Table_Abstract
{

    protected    $_name = 'odbcpush';
    protected    $_primary = 'id';
    private      $_global = null;
    protected    $_rowClass = "Application_Model_DbTable_Row_OdbcPush";

    // etc

}

