cant edit primary key

Hi,

I’ve been following the yii framework tutorials, which have been great. Everything works accept for a small minor edit which I can’t find an answer to. I performed the model and crud commands from the yii shell on my tables. All the necessary fields are there ACCEPT the primary key fields. Can someone tell my how I can get it to allow me to edit these fields.

Add a row in the view for collect the input.

Add the validation rules for the primaryKey in the model.

Beware of some security issues if you are planning to expose the primary key management to the public…they may break your application…

In general it’s not a good solution to allow primary key change…

If you need that option… you can add a new field (like PID) to the table and set that as a primary key…

than your currently primary key field can become editable… and you can set an index (unique if needed) on that field…