add protected function generationPrimaryKey on insert
Refactoring generate PrimaryKey
Merge pull request #168 from Rathil/master

add protected function generationPrimaryKey on insert