need AR saveByPk()

We are migrating from our old application to the Yii application. There are lots of relations between tables, so saving records’ primary keys is a must…

Ability to create an active record with a predefined primary key would be highly appreciated. Thanks.

My bad, I forgot to add ‘id’ to safeAttributes(). All I needed to do is $model->id=$id;

Please, delete this topic.