On Sun, Dec 14, 2008 at 3:25 PM, WebbedIT <[email protected]> wrote:
>> - Select (rather than type) the commercial vendor type
>
> This should work within scaffolding, if it is not then the automagic
> is failing to pick up a list of commercial_vendor_types for some
> reason.  Have you added any vendor types at 
> http://servername/commercial_vendor_types/add?

Yes. vendor type records have been created. Here is how my model
relationships are defined:

class CommercialVendor extends AppModel {
        public $name            = 'CommercialVendor';
        public $primaryKey      = 'vendor_id';
        public $belongsTo       = array ( 'Vendor' );
}
class CommercialVendorType extends AppModel {

        public $name         = 'CommercialVendorType';
        public $hasMany   = array ( 'CommercialVendor' );
}

What I see in the scaffolded form is a textbox to enter the vendor
type. I should mention that for lookup tables, I prefer human readable
id values, so the "id" field is defined as a varchar(255). I don't
know whether that makes any difference, but it's a deviation from the
convention, so I thought I'd mention it.

Thanks.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" 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