(Cake1.2, using Bindable)

Just when I thought I had this figured out...

I have 3 models:

Fund => belongsTo (FundType), HABTM(Discipline)
FundType => hasMany(Fund)
Discipline => HABTM(Fund)

FundsController:

function listByDisciplineAndType()
{
        $discipline_slug = $this->params['discipline_slug'];
        $fund_type_slug = $this->params['fund_type_slug'];

        $fields = array('Fund.name', [Fund.etc...]);
        $criteria = array(
                'conditions' => array(
                        'Discipline.slug' => $discipline_slug,
                        'FundType.slug' => $fund_type_slug
                ),
                'restrict' => array(
                        'Discipline(name, slug)',
                        'FundType(name)'
                )
        );

        $this->set('funders', $this->Fund->find('all', $criteria, $fields));
}

For some reason beyond my ken, Cake isn't selecting on Discipline
(I've also tried adding it to the $fields array).

Can anyone point out out my error?


--~--~---------~--~----~------------~-------~--~----~
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