I have a table in my database and worked this by yii model and this table had not primarykey and id column.
Then i decide to add an id column to this table. When added an id column as primaryKey my model cannot find this new column as primaryKey and when i called $this->primaryKey in my model, return null to me!