Friday, December 4, 2009

CakePHP 1.2 can't find my foreign key relationship

I know I'm just doing something silly, but I can't figure out what.

These are my tables, which are in PostgreSQL

\d regions;
------------+-----------------------
+------------------------------------------------------
id | integer | not null default nextval
('regions_id_seq'::regclass)
name | character varying(20) | not null
type | character varying(5) | not null
sort_order | integer | not null

\d carriers;
id | integer | not null default
nextval('carriers_id_seq'::regclass)
carrier_name | character varying(20) | not null
contact_name | character varying(20) | not null
region_id | integer | not null

I have a Region model already created. I used "cake bake" to create
the Carriers files. But it never, ever creates a drop-down or any
population from the regions table -- just a field for region_id in the
add.ctp and edit.ctp files.

What I have done wrong?

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

No comments: