One-to-many relationship in the same table in zend
Posted
by Behrang
on Stack Overflow
See other posts from Stack Overflow
or by Behrang
Published on 2010-05-05T06:01:45Z
Indexed on
2010/05/05
6:08 UTC
Read the original article
Hit count: 358
I have groupTable(group_id,group_name,group_date,group_parent_id) in face each group have many group child I create groupModel and I want to begin coding is this right code to handle
protected $_name = 'group'; protected $_dependentTables = array('Model_group'); protected $_referenceMap = array('Model_group' => array('columns' => array('group_parent_id') , 'refTableClass' => 'Model_group' , 'refColumns' => array('group_id') , 'onDelete' => self::CASCADE , 'onUpdate' => self::RESTRICT) );
© Stack Overflow or respective owner