Fixes issue of SQLServer not returning lastInsertId due to primaryKey being passed to the method