add protected function generationPrimaryKey on insert

In order to be able to redefine the primary key when creating new records