Try being more verbose with your association declarations.
Assign one for both the parent and the child. I will post an example.
[snip]
class DownloadCategory extends AppModel
{
var $name = 'DownloadCategory';
var $displayField = 'download_category_name';
var $hasMany = array(
'Child Download Category' => array(
'className' => 'DownloadCategory',
'foreignKey' => 'download_category_parent_id' )
);
var $belongsTo = array(
'Parent Download Category' => array(
'className' => 'DownloadCategoryCategory',
'foreignKey' => 'download_category_parent_id' )
);
[/snip]
I used long table names here. I might be doing this incorrectly as when
I scaffold this I get some interesting menu items in the scaffold view
method for a category. It has list category ( from the belongs to ) and
list categories ( from the has many ) displayed as options. If there is
a better way to do this I am unaware of it.
Hope I helped and that someone can help both of us beyond this point.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" 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
-~----------~----~----~----~------~----~------~--~---