For Cake 1.2 take a look at Containable behaviour
http://www.thinkingphp.org/2007/06/14/containable-20-beta/ or Bindable
behaviour (I prefer it! :-) : http://cake-syrup.sourceforge.net/

For cake 1.1 search this group for keyword 'expects' :-)

On Dec 10, 4:24 pm, Baz <[EMAIL PROTECTED]> wrote:
> I have a simple question (I think).
>
> I have a model (Requests), which has a lot of relationships including 3
> belongsTo (Equipment, Classroom, Department).
> The Classroom model has a belongsTo (Building).
>
> I'm doing a findAll/paginate in the Request controller with
> $this->Request->recursive = 1 and get MOST of what I need. However, I'm
> trying to tack onto that, the Building reference.
>
> I've tried this:
> $this->Request->Classroom->recursive = 2;
>
> To just set the recursive set to 2 on the Classroom model only (Doesn't
> work).
>
> I've tried doing a $this->Request->Classroom->bindModel(.....)
> Doesn't work.
>
> What does work is:
> $this->Request->recursive = 2, however I get a whole recursive mess on the
> other models (Eqiupment, Department). Then I have to go unbind ALL the other
> stuff I don't need.
>
> Is there a shortcut here? I just wanna change the recursiveness on ONE
> associated model.
>
> Please ask for details if I'm unclear:
> --
> Baz L
> Web Development 2.0: Web Design, CakePHP, 
> Javascripthttp://www.WebDevelopment2.com/
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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