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' ,
'refColu开发者_如何学Cmns' => array('group_id') ,
'onDelete' => self::CASCADE ,
'onUpdate' => self::RESTRICT)
);
One to many implies more than one table
精彩评论