Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot handle numeric identities when they > max integer value #113

Open
chengen1213 opened this issue Oct 7, 2021 · 1 comment
Open

Comments

@chengen1213
Copy link

chengen1213 commented Oct 7, 2021

System.OverflowException: Value was either too large or too small for an Int32.
at System.Decimal.ToInt32(Decimal d)
at System.Decimal.op_Explicit(Decimal value)
at SqlCeServerAdapter.Insert(IDbConnection connection, IDbTransaction transaction, Nullable1 commandTimeout, String tableName, String columnList, String parameterList, IEnumerable1 keyProperties, Object entityToInsert) in //Dapper.Contrib/SqlMapperExtensions.cs:line 884
at Dapper.Contrib.Extensions.SqlMapperExtensions.Insert[T](IDbConnection connection, T entityToInsert, IDbTransaction transaction, Nullable`1 commandTimeout) in /
/Dapper.Contrib/SqlMapperExtensions.cs:line 377

var id = (int)r[0].id;

in \SqlMapperExtensions.cs

line 884 - cannot handle numeric identities when they > max integer value

@emilsteen
Copy link

This has been known since 2016 and is being considered since 2017 for version 3.
Value was either too large or too small for an Int32.

So it is probably not going to be solved soon. I'm currently looking for a work-around myself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants