hy
let have a example
i have
table tags model Tag
table contenttags and model Contenttag
table catgorytags and model Catgorytag
in model Tag
var $hasMany = array(
'Contenttag' => array('className' => 'Contenttag',
'foreignKey' =>
'tag_id',
),
'Categorytag' => array('className' => 'Categorytag',
'foreignKey' =>
'tag_id',
),
'Contenttypetag' => array('className' =>
'Contenttypetag',
'foreignKey' =>
'tag_id',
)
);
other Contenttag && categoryTag are like
class Contenttag extends AppModel{
var $belongsTo = array('Tag');
}
now i want to delete record form tag table which should also be delete
from contenttag and categorytag. what should i do ? for this.
should i need to define the dependent table as well
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---