2008年11月21日星期五

[fw-db] Zend DB -> tables relations

Hi another time,
I'm sorry about insistence, but i can't understand why we need to create things like :  

'Reporter' => array(
            'columns'           => 'reported_by',
            'refTableClass'     => 'Accounts',
            'refColumns'        => 'account_name '
        ), here.

Here is my example:

class News extends Zend_Db_Table_Abstract
{
    protected $_name 'news';
    protected $_primary 'ID';
}

class CatNews extends Zend_Db_Table_Abstract
{
    protected $_name 'catnews';
    protected $_primary 'ID';
    protected $_dependentTables = array('news');
}

How can i represent here, my foreign keys? This is the only things that i need?

Thanks in advance!

没有评论: