Fix setter of primary key was not called when inserting.