Error: Table “user” does not have a primary key.
Solution:
The crud command requires primary key to be defined in your tables. If you are working with legacy tables and can’t specify primary key, you can declare it in primaryKey() method of your model class.
override method primaryKey in protected/models/User.php
[php]
public function primaryKey()
{
return ‘id’;
}
[/php]