add protected function generationPrimaryKey on insert