Make sure to have the following in your controller:

$uses = array('Label');

or else it can't find the class automagically for you.

On 4/23/07, grimborg <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I have a table "document" with a hasMany relation to a table "label".
> In the add view of my document I'd like to show  a list of all
> available "label"s. So I code an add method in the DocumentController
> and add something like:
>
>                 $l = new Label();
>                 $l = $l->findAll();
>                 $this->set('labels',$l);
>
> But I get a "Class Label not found" error.
>
> What's the right way to archieve this? I've been reading tutorials but
> found no reference to this...
>
> Thanks!
>
>
> >
>


-- 
Chris Hartjes

My motto for 2007:  "Just build it, damnit!"

@TheBallpark - http://www.littlehart.net/attheballpark
@TheKeyboard - http://www.littlehart.net/atthekeyboard

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