hmm I think I have done that.

In my first post I posted this:

Notes Model:
----------
    var $name = 'Note';
     var $belongsTo = array ('Category' => array(
        'className' => 'Category',
        'conditions' =>'',
        'order' =>'',
        'foreignKey' => 'category_id')
    );

Category Model:
---------
    var $name = 'Category';
    var $hasMany = array ('Note' => array(
        'className' => 'Note',
        'conditions' =>'',
        'order' =>'',
        'foreignKey' => 'category_id')
    );


Is this not right? Should I change it to the way you said so cakephp
handles it on its own?

On Dec 15, 12:15 pm, "nate" <[EMAIL PROTECTED]> wrote:
> Yes, you're missing something fairly important: you didn't actually
> associate your models with each other, so Cake has no idea that you
> also want Notes when you ask for Categories.  Your model classes should
> look a little something like the following:
>
> class Category extends AppModel {
>     var $name = 'Category';
>     var $hasMany = 'Note';
>
> }class Note extends AppModel {
>     var $name = 'Note';
>     var $belongsTo = 'Category';
> 
> }


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