Add throw exception at primary key duplicate