views:

274

answers:

1

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
Must have missed it, thanks!
Graham