I have a simple database with multiple tables. I can't figure out how to make cakePHP display the values associated with the foreign key in the index view. Or create a view in which the fields of your choice (those that make sense to users, such as the location name, not location_id, can be updated or viewed on the same page).
I created an example at http://lovecats.cakeapp.com that illustrates the question. If you look at the page and click on the “cats list”, you will notice that it displays the location_id field from the location table. You will also notice that when you click "add cats", you must select location_id from the location table. This is an automated way to create a cakePHP application. I want this to be the location_name field.

The database is configured so that table cats have a foreign key called location_id, which is related to a table called locations.

This is my problem: I want these pages to display location_name instead of location_id. If you want to enter the application, you can go to http://cakeapp.com/sqldesigners/sql/lovecats and the password is 'password' to look at the db relationships, etc ..
How do I have a page that displays the fields I want? Is it possible to create a page that simultaneously updates fields from all tables?
This is a piece of cake that I was trying to figure out, and it REALLY will return me for the hump. You can download the application and sql from the above url.
source share