Tu peux définir ton modèle avec une relation hasMany et belongsTo
Par contre, tu devrais renommer ton champs contact par parent_id afin de
respecter les conventions CakePHP.
var $hasMany = array(
'Enfant' => array('className' => 'Contact',
'foreignKey' => 'pazent_id'),
)
);
var $belongsTo = array('Parent' =>
array('className' => 'Contact',
'foreignKey' => 'parent_id'
)
);
Dans ce cas, tu peux utiliser $this->Contact->AllThreaded()
Model::findAllThreaded ( $ conditions = null,
$ fields = null,
$ sort = null
)
--~--~---------~--~----~------------~-------~--~----~
Groupe "Cakephp-fr".
Adresse : [email protected]
Pour résilier : [EMAIL PROTECTED]
Pour les options : http://groups.google.com/group/cakephp-fr?hl=fr
-~----------~----~----~----~------~----~------~--~---