Model::setPrimary
Set Primary ID name
Description
public self Model::setPrimary( string $id )
Arguments
Name | Data type | Default | Remarks |
---|---|---|---|
$id | string | Primary ID name |
Example
Controller
$model = new Model();
$model->setPrimary('news_id');
// Same with the following
$model = new Model(false, array(
'id' => 'news_id',
));