Dapper-Extensions icon indicating copy to clipboard operation
Dapper-Extensions copied to clipboard

Insert fails if identity result exceeds 32 bit integer

Open code-chump opened this issue 7 years ago • 1 comments

When the identity value generated for an insert exceeeds a 32 bit integer the single entity DapperImplementor.Insert<T>() method throws an error because there is code to always convert the result identity value to an Int32.

Is there a reason why the long identity value cannot be used for the keyValues collection? Or is this a simple oversight of checking the result identity value does not break the 32 bit limit before converting?

code-chump avatar Mar 02 '17 04:03 code-chump

It is fixed in the next version as the type was moved from int to long and it's now a 64bit integer.

valfrid-ly avatar May 10 '21 13:05 valfrid-ly