I use my blog entries’ URLs as primary keys. When they are modified, Yii attempts to update the row identified with new PK which cannot exist at that time.
Update:
I did a workaround so that Post model stores the oldUrl (afterFind()), and I extended update() from CActiveRecord so it calls updateByPk() correctly.
Primary key should be a value that have no chance to be altered. So, never use names, credit card numbers, urls, paths or something alike. I will avoid SO many problems, not just in Yii.