Quantcast

Foreign Keys in ZF

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Foreign Keys in ZF

Carlos Castro-2
Hi everybody,
I need some help to understand the tables relations on ZF.
Through Programmers Reference Guide, i can see next example:

class Bugs extends Zend_Db_Table_Abstract
{
    protected $_name            = 'bugs';

    protected $_dependentTables = array('BugsProducts');

    protected $_referenceMap    = array(
        'Reporter' => array(
            'columns'           => 'reported_by',
            'refTableClass'     => 'Accounts',
            'refColumns'        => 'account_name'
        ),

My question is about $_referenceMap.  To represent the foreign keys of my DB, i need to specify rules (like, in this case, Reporter)? On DB, to create Foreign Keys, i don't need inserting some kind of data into tables.

Thanks by helping me!


Loading...