For example: I create new model, set the id field to 1 and save it. It runs fine and saves with the id = 1 into a database. I open MySQL console and delete all records from the table. When I delete it, create new model again and set the id field to 1 - it actually saves it with the 2 as the id field value.
I'm guessing Yii gets the current auto_increment value from mysql and override my id value. Is there a way to prevent that behavior?
EDIT (my code sample):
$sn = new SaplingNode();
$sn->id = 1;
$sn->save();
I call it twice, between calls I delete the record using mysql console. That's all.