been using cake a fortnight or so, very impressed, i'm up and running and
it is saving heaps of time  :-) ... but looking for a little clarificaton

Say I have a model called "Items" which is my main table of data.
This contains a couple of foreign keys, say "status_id" and "priority_id"

"Statuses" and "Priorities" contain two fields, id and description
(these occasionally get changed and updated, especially by admin users,
which is why they need their own models to update via web form)

I think it is an M:1 relationship from Items to Statuses [or Priorities]
(i.e. Many different Items can have the same status [or priority])

In Items, and this class alone, I say something like below. Is
this the right relationship descriptor? Does "Statuses" need anything?
I've tried reading the docs but i can't quite get my head round it.

    var $hasOne = array(
        'Status' =>
            array('className' => 'Status',
                'foreignKey' => 'id',
                'conditions' => '',
                'fields' => '',
                'order' => '',
                'dependent' => 'false'
            ),

If I do this, what can I expect? I was kind of hoping the scaffolding would
replace
the numeric id's in the basic form with the descriptive versions (maybe that
is asking
a little too much!)  Is it the case that the data is in the variable on the
page, i just need

Ta, HG

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