I have a table called categories. The table holds categories and their sub(subsub)categories...
Its an easy table:
Tree behaviour is overkill for this situation. You just need to set your model up like this:
class Category extends AppModel {
public $hasMany = array(
'Children'=>array(
'className'=>'Category',
'foreignKey'=>'parent_id'
)
);
public $belongsTo = array(
'Parent'=>array(
'className'=>'Category',
'foreignKey'=>'parent_id'
)
);
}
Now, when you do a find() on Category, you'll get two additional Models called Parent (which points to the parent id) and Children (which lists it's children).