3.7.8.4 primaryKey
Each table normally has a primary key, id. You may change which field name the model uses as its primary key. This is common when setting CakePHP to use an existing database table.
Example usage:
class Example extends AppModel {
var $primaryKey = 'example_id'; // example_id is the field name in the database
} class Example extends AppModel {var $primaryKey = 'example_id'; // example_id is the field name in the database}
See comments for this section
