Still having problems with this.  When I set the recursion higher, it
attempts to run some queries against the structure table (as 'Parent')
but referencing the wrong alias (Structure.parent_id)

The code is shown below, everything works great if recursive is 1, but
I need to get some deeper information.  Anyone have some ideas, please
take into account that I couldn't get the no foreignKey thing to work
and had to edit the model.php file.

class News extends AppModel {
        var $name = 'News';
        var $recursive = 2;
        var $belongsTo = array(
                'Structure' => array(
                        'className' => 'Structure',
                        'foreignKey' => 'structure_id',
                        'fields' => 'id,type_id,title,abbr,abandoned'
                ),
                'Parent' => array(
                        'className' => 'Structure',
                        'foreignKey' => false,
                        'conditions' => 'Structure.parent_id = parent.id',
                        'fields' => 'id,type_id,title,abbr,abandoned'
                )
        );

--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to