Your explanation is lacking some details.
what do you do when you expect the primary key to be "updated"?
how should it be "updated" ?
how are your model relations set up ?
what is the (relevant) controller code that is not working as expected?