So it seems that cakePHP tables need a field called "name" or else the id number is displayed while testing out table relationships in the scaffold. Is there a way around this? instead of 'id' 'name' 'last_name' in my table, I want 'id' 'first_name' 'last_name'. I have to have a "name" field for every table in order to display the proper data...
+3
A:
Can't you just set the $displayField property on your model class, just like the manual says to?
<?php
class User extends AppModel
{
var $name = 'User';
var $displayField = 'first_name';
}
?>
timdev
2009-09-30 00:05:02
Must have missed it, thanks!
Graham
2009-09-30 00:07:31